1 ; RUN: llc -march=hexagon < %s | FileCheck %s
4 ; CHECK: memb(r0++#-1) = r1
5 define i8* @foo1(i8* %a, i8 %b) {
7 %c = getelementptr i8, i8* %a, i32 -1
12 ; CHECK: memh(r0++#-2) = r1
13 define i16* @foo2(i16* %a, i16 %b) {
15 %c = getelementptr i16, i16* %a, i32 -1
20 ; CHECK: memw(r0++#-4) = r1
21 define i32* @foo3(i32* %a, i32 %b) {
23 %c = getelementptr i32, i32* %a, i32 -1
28 ; CHECK: memd(r0++#-8) = r3:2
29 define i64* @foo4(i64* %a, i64 %b) {
31 %c = getelementptr i64, i64* %a, i32 -1
36 ; CHECK: if (p0.new) memw(r0+#0) = #-1
37 define void @foo5(i32* %a, i1 %b) {
38 br i1 %b, label %x, label %y
47 ; CHECK: p0 = cmp.eq(r0,#-1)
48 define i1 @foo7(i32 %a) {
49 %b = icmp eq i32 %a, -1
54 ; CHECK: memb(r0+#-1) = r1
55 define void @foo8(i8* %a, i8 %b) {
56 %c = getelementptr i8, i8* %a, i32 -1
62 ; CHECK: memh(r0+#-2) = r1
63 define void @foo9(i16* %a, i16 %b) {
64 %c = getelementptr i16, i16* %a, i32 -1
70 ; CHECK: memw(r0+#-4) = r1
71 define void @foo10(i32* %a, i32 %b) {
72 %c = getelementptr i32, i32* %a, i32 -1
78 ; CHECK: memd(r0+#-8) = r3:2
79 define void @foo11(i64* %a, i64 %b) {
80 %c = getelementptr i64, i64* %a, i32 -1
86 ; CHECK: r1 = mux(p0,#-1,r0)
87 define i32 @foo12(i32 %a, i1 %b) {
88 br i1 %b, label %x, label %y