brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 117041c Raw
93 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2;3; Bug 6840. Use absolute+index addressing.4 5@ga = common global [1024 x i8] zeroinitializer, align 86 7; CHECK-LABEL: test08; CHECK: memub(r{{[0-9]+}}+##ga)9define zeroext i8 @test0(i32 %i) nounwind readonly {10entry:11  %t = getelementptr inbounds [1024 x i8], ptr @ga, i32 0, i32 %i12  %0 = load i8, ptr %t, align 113  ret i8 %014}15 16; CHECK-LABEL: test117; CHECK: memb(r{{[0-9]+}}+##ga)18define signext i8 @test1(i32 %i) nounwind readonly {19entry:20  %t = getelementptr inbounds [1024 x i8], ptr @ga, i32 0, i32 %i21  %0 = load i8, ptr %t, align 122  ret i8 %023}24 25; CHECK-LABEL: test226; CHECK: memub(r{{[0-9]+}}<<#1+##ga)27define zeroext i8 @test2(i32 %i) nounwind readonly {28entry:29  %j = shl nsw i32 %i, 130  %t = getelementptr inbounds [1024 x i8], ptr @ga, i32 0, i32 %j31  %0 = load i8, ptr %t, align 132  ret i8 %033}34 35; CHECK-LABEL: test336; CHECK: memb(r{{[0-9]+}}<<#1+##ga)37define signext i8 @test3(i32 %i) nounwind readonly {38entry:39  %j = shl nsw i32 %i, 140  %t = getelementptr inbounds [1024 x i8], ptr @ga, i32 0, i32 %j41  %0 = load i8, ptr %t, align 142  ret i8 %043}44 45; CHECK-LABEL: test446; CHECK: memub(r{{[0-9]+}}<<#2+##ga)47define zeroext i8 @test4(i32 %i) nounwind readonly {48entry:49  %j = shl nsw i32 %i, 250  %t = getelementptr inbounds [1024 x i8], ptr @ga, i32 0, i32 %j51  %0 = load i8, ptr %t, align 152  ret i8 %053}54 55; CHECK-LABEL: test556; CHECK: memb(r{{[0-9]+}}<<#2+##ga)57define signext i8 @test5(i32 %i) nounwind readonly {58entry:59  %j = shl nsw i32 %i, 260  %t = getelementptr inbounds [1024 x i8], ptr @ga, i32 0, i32 %j61  %0 = load i8, ptr %t, align 162  ret i8 %063}64 65; CHECK-LABEL: test1066; CHECK: memb(r{{[0-9]+}}+##ga)67define void @test10(i32 %i, i8 zeroext %v) nounwind {68entry:69  %t = getelementptr inbounds [1024 x i8], ptr @ga, i32 0, i32 %i70  store i8 %v, ptr %t, align 171  ret void72}73 74; CHECK-LABEL: test1175; CHECK: memb(r{{[0-9]+}}<<#1+##ga)76define void @test11(i32 %i, i8 signext %v) nounwind {77entry:78  %j = shl nsw i32 %i, 179  %t = getelementptr inbounds [1024 x i8], ptr @ga, i32 0, i32 %j80  store i8 %v, ptr %t, align 181  ret void82}83 84; CHECK-LABEL: test1285; CHECK: memb(r{{[0-9]+}}<<#2+##ga)86define void @test12(i32 %i, i8 zeroext %v) nounwind {87entry:88  %j = shl nsw i32 %i, 289  %t = getelementptr inbounds [1024 x i8], ptr @ga, i32 0, i32 %j90  store i8 %v, ptr %t, align 191  ret void92}93