• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=hexagon -mcpu=hexagonv4 -disable-hsdr < %s | FileCheck %s
2
3declare void @bar(i64)
4
5; CHECK-LABEL: halfword:
6; CHECK: combine(#0
7
8define void @halfword(i16* nocapture %a) nounwind {
9entry:
10  %0 = load i16, i16* %a, align 2
11  %1 = zext i16 %0 to i64
12  %add.ptr = getelementptr inbounds i16, i16* %a, i32 1
13  %2 = load i16, i16* %add.ptr, align 2
14  %3 = zext i16 %2 to i64
15  %4 = shl nuw nsw i64 %3, 16
16  %ins = or i64 %4, %1
17  tail call void @bar(i64 %ins) nounwind
18  ret void
19}
20
21; CHECK-LABEL: byte:
22; CHECK: combine(#0
23
24define void @byte(i8* nocapture %a) nounwind {
25entry:
26  %0 = load i8, i8* %a, align 1
27  %1 = zext i8 %0 to i64
28  %add.ptr = getelementptr inbounds i8, i8* %a, i32 1
29  %2 = load i8, i8* %add.ptr, align 1
30  %3 = zext i8 %2 to i64
31  %4 = shl nuw nsw i64 %3, 8
32  %ins = or i64 %4, %1
33  tail call void @bar(i64 %ins) nounwind
34  ret void
35}
36