summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AArch64/arm64-vector-ldst.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/AArch64/arm64-vector-ldst.ll')
-rw-r--r--llvm/test/CodeGen/AArch64/arm64-vector-ldst.ll129
1 files changed, 41 insertions, 88 deletions
diff --git a/llvm/test/CodeGen/AArch64/arm64-vector-ldst.ll b/llvm/test/CodeGen/AArch64/arm64-vector-ldst.ll
index 6e530cb258b..938b3d1d059 100644
--- a/llvm/test/CodeGen/AArch64/arm64-vector-ldst.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-vector-ldst.ll
@@ -264,196 +264,149 @@ entry:
; Add a bunch of tests for rdar://13258794: Match LDUR/STUR for D and Q
; registers for unscaled vector accesses
+@str = global [63 x i8] c"Test case for rdar://13258794: LDUR/STUR for D and Q registers\00", align 1
-define <1 x i64> @fct0(i8* %str) nounwind readonly ssp {
+define <1 x i64> @fct0() nounwind readonly ssp {
entry:
; CHECK-LABEL: fct0:
; CHECK: ldur {{d[0-9]+}}, [{{x[0-9]+}}, #3]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <1 x i64>*
- %0 = load <1 x i64>, <1 x i64>* %q, align 8
+ %0 = load <1 x i64>, <1 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <1 x i64>*), align 8
ret <1 x i64> %0
}
-define <2 x i32> @fct1(i8* %str) nounwind readonly ssp {
+define <2 x i32> @fct1() nounwind readonly ssp {
entry:
; CHECK-LABEL: fct1:
; CHECK: ldur {{d[0-9]+}}, [{{x[0-9]+}}, #3]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <2 x i32>*
- %0 = load <2 x i32>, <2 x i32>* %q, align 8
+ %0 = load <2 x i32>, <2 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <2 x i32>*), align 8
ret <2 x i32> %0
}
-define <4 x i16> @fct2(i8* %str) nounwind readonly ssp {
+define <4 x i16> @fct2() nounwind readonly ssp {
entry:
; CHECK-LABEL: fct2:
; CHECK: ldur {{d[0-9]+}}, [{{x[0-9]+}}, #3]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <4 x i16>*
- %0 = load <4 x i16>, <4 x i16>* %q, align 8
+ %0 = load <4 x i16>, <4 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <4 x i16>*), align 8
ret <4 x i16> %0
}
-define <8 x i8> @fct3(i8* %str) nounwind readonly ssp {
+define <8 x i8> @fct3() nounwind readonly ssp {
entry:
; CHECK-LABEL: fct3:
; CHECK: ldur {{d[0-9]+}}, [{{x[0-9]+}}, #3]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <8 x i8>*
- %0 = load <8 x i8>, <8 x i8>* %q, align 8
+ %0 = load <8 x i8>, <8 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <8 x i8>*), align 8
ret <8 x i8> %0
}
-define <2 x i64> @fct4(i8* %str) nounwind readonly ssp {
+define <2 x i64> @fct4() nounwind readonly ssp {
entry:
; CHECK-LABEL: fct4:
; CHECK: ldur {{q[0-9]+}}, [{{x[0-9]+}}, #3]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <2 x i64>*
- %0 = load <2 x i64>, <2 x i64>* %q, align 16
+ %0 = load <2 x i64>, <2 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <2 x i64>*), align 16
ret <2 x i64> %0
}
-define <4 x i32> @fct5(i8* %str) nounwind readonly ssp {
+define <4 x i32> @fct5() nounwind readonly ssp {
entry:
; CHECK-LABEL: fct5:
; CHECK: ldur {{q[0-9]+}}, [{{x[0-9]+}}, #3]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <4 x i32>*
- %0 = load <4 x i32>, <4 x i32>* %q, align 16
+ %0 = load <4 x i32>, <4 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <4 x i32>*), align 16
ret <4 x i32> %0
}
-define <8 x i16> @fct6(i8* %str) nounwind readonly ssp {
+define <8 x i16> @fct6() nounwind readonly ssp {
entry:
; CHECK-LABEL: fct6:
; CHECK: ldur {{q[0-9]+}}, [{{x[0-9]+}}, #3]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <8 x i16>*
- %0 = load <8 x i16>, <8 x i16>* %q, align 16
+ %0 = load <8 x i16>, <8 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <8 x i16>*), align 16
ret <8 x i16> %0
}
-define <16 x i8> @fct7(i8* %str) nounwind readonly ssp {
+define <16 x i8> @fct7() nounwind readonly ssp {
entry:
; CHECK-LABEL: fct7:
; CHECK: ldur {{q[0-9]+}}, [{{x[0-9]+}}, #3]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <16 x i8>*
- %0 = load <16 x i8>, <16 x i8>* %q, align 16
+ %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <16 x i8>*), align 16
ret <16 x i8> %0
}
-define void @fct8(i8* %str) nounwind ssp {
+define void @fct8() nounwind ssp {
entry:
; CHECK-LABEL: fct8:
; CHECK: ldur [[DESTREG:d[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <1 x i64>*
- %0 = load <1 x i64>, <1 x i64>* %q, align 8
- %p2 = getelementptr inbounds i8, i8* %str, i64 4
- %q2 = bitcast i8* %p2 to <1 x i64>*
- store <1 x i64> %0, <1 x i64>* %q2, align 8
+ %0 = load <1 x i64>, <1 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <1 x i64>*), align 8
+ store <1 x i64> %0, <1 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <1 x i64>*), align 8
ret void
}
-define void @fct9(i8* %str) nounwind ssp {
+define void @fct9() nounwind ssp {
entry:
; CHECK-LABEL: fct9:
; CHECK: ldur [[DESTREG:d[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <2 x i32>*
- %0 = load <2 x i32>, <2 x i32>* %q, align 8
- %p2 = getelementptr inbounds i8, i8* %str, i64 4
- %q2 = bitcast i8* %p2 to <2 x i32>*
- store <2 x i32> %0, <2 x i32>* %q2, align 8
+ %0 = load <2 x i32>, <2 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <2 x i32>*), align 8
+ store <2 x i32> %0, <2 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <2 x i32>*), align 8
ret void
}
-define void @fct10(i8* %str) nounwind ssp {
+define void @fct10() nounwind ssp {
entry:
; CHECK-LABEL: fct10:
; CHECK: ldur [[DESTREG:d[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <4 x i16>*
- %0 = load <4 x i16>, <4 x i16>* %q, align 8
- %p2 = getelementptr inbounds i8, i8* %str, i64 4
- %q2 = bitcast i8* %p2 to <4 x i16>*
- store <4 x i16> %0, <4 x i16>* %q2, align 8
+ %0 = load <4 x i16>, <4 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <4 x i16>*), align 8
+ store <4 x i16> %0, <4 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <4 x i16>*), align 8
ret void
}
-define void @fct11(i8* %str) nounwind ssp {
+define void @fct11() nounwind ssp {
entry:
; CHECK-LABEL: fct11:
; CHECK: ldur [[DESTREG:d[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <8 x i8>*
- %0 = load <8 x i8>, <8 x i8>* %q, align 8
- %p2 = getelementptr inbounds i8, i8* %str, i64 4
- %q2 = bitcast i8* %p2 to <8 x i8>*
- store <8 x i8> %0, <8 x i8>* %q2, align 8
+ %0 = load <8 x i8>, <8 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <8 x i8>*), align 8
+ store <8 x i8> %0, <8 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <8 x i8>*), align 8
ret void
}
-define void @fct12(i8* %str) nounwind ssp {
+define void @fct12() nounwind ssp {
entry:
; CHECK-LABEL: fct12:
; CHECK: ldur [[DESTREG:q[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <2 x i64>*
- %0 = load <2 x i64>, <2 x i64>* %q, align 16
- %p2 = getelementptr inbounds i8, i8* %str, i64 4
- %q2 = bitcast i8* %p2 to <2 x i64>*
- store <2 x i64> %0, <2 x i64>* %q2, align 16
+ %0 = load <2 x i64>, <2 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <2 x i64>*), align 16
+ store <2 x i64> %0, <2 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <2 x i64>*), align 16
ret void
}
-define void @fct13(i8* %str) nounwind ssp {
+define void @fct13() nounwind ssp {
entry:
; CHECK-LABEL: fct13:
; CHECK: ldur [[DESTREG:q[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <4 x i32>*
- %0 = load <4 x i32>, <4 x i32>* %q, align 16
- %p2 = getelementptr inbounds i8, i8* %str, i64 4
- %q2 = bitcast i8* %p2 to <4 x i32>*
- store <4 x i32> %0, <4 x i32>* %q2, align 16
+ %0 = load <4 x i32>, <4 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <4 x i32>*), align 16
+ store <4 x i32> %0, <4 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <4 x i32>*), align 16
ret void
}
-define void @fct14(i8* %str) nounwind ssp {
+define void @fct14() nounwind ssp {
entry:
; CHECK-LABEL: fct14:
; CHECK: ldur [[DESTREG:q[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <8 x i16>*
- %0 = load <8 x i16>, <8 x i16>* %q, align 16
- %p2 = getelementptr inbounds i8, i8* %str, i64 4
- %q2 = bitcast i8* %p2 to <8 x i16>*
- store <8 x i16> %0, <8 x i16>* %q2, align 16
+ %0 = load <8 x i16>, <8 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <8 x i16>*), align 16
+ store <8 x i16> %0, <8 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <8 x i16>*), align 16
ret void
}
-define void @fct15(i8* %str) nounwind ssp {
+define void @fct15() nounwind ssp {
entry:
; CHECK-LABEL: fct15:
; CHECK: ldur [[DESTREG:q[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
- %p = getelementptr inbounds i8, i8* %str, i64 3
- %q = bitcast i8* %p to <16 x i8>*
- %0 = load <16 x i8>, <16 x i8>* %q, align 16
- %p2 = getelementptr inbounds i8, i8* %str, i64 4
- %q2 = bitcast i8* %p2 to <16 x i8>*
- store <16 x i8> %0, <16 x i8>* %q2, align 16
+ %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <16 x i8>*), align 16
+ store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <16 x i8>*), align 16
ret void
}
OpenPOWER on IntegriCloud