mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[VectorCombine] add tests for non-zero gep offsets; NFC
This commit is contained in:
parent
1a5b0cb812
commit
3c783375b2
@ -55,8 +55,8 @@ define float @matching_fp_vector(<4 x float>* align 16 dereferenceable(16) %p) {
|
||||
ret float %r
|
||||
}
|
||||
|
||||
define float @matching_fp_vector_gep0(<4 x float>* align 16 dereferenceable(16) %p) {
|
||||
; CHECK-LABEL: @matching_fp_vector_gep0(
|
||||
define float @matching_fp_vector_gep00(<4 x float>* align 16 dereferenceable(16) %p) {
|
||||
; CHECK-LABEL: @matching_fp_vector_gep00(
|
||||
; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds <4 x float>, <4 x float>* [[P:%.*]], i64 0, i64 0
|
||||
; CHECK-NEXT: [[R:%.*]] = load float, float* [[GEP]], align 16
|
||||
; CHECK-NEXT: ret float [[R]]
|
||||
@ -66,6 +66,50 @@ define float @matching_fp_vector_gep0(<4 x float>* align 16 dereferenceable(16)
|
||||
ret float %r
|
||||
}
|
||||
|
||||
define float @matching_fp_vector_gep01(<4 x float>* align 16 dereferenceable(20) %p) {
|
||||
; CHECK-LABEL: @matching_fp_vector_gep01(
|
||||
; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds <4 x float>, <4 x float>* [[P:%.*]], i64 0, i64 1
|
||||
; CHECK-NEXT: [[R:%.*]] = load float, float* [[GEP]], align 4
|
||||
; CHECK-NEXT: ret float [[R]]
|
||||
;
|
||||
%gep = getelementptr inbounds <4 x float>, <4 x float>* %p, i64 0, i64 1
|
||||
%r = load float, float* %gep, align 4
|
||||
ret float %r
|
||||
}
|
||||
|
||||
define float @matching_fp_vector_gep01_deref(<4 x float>* align 16 dereferenceable(19) %p) {
|
||||
; CHECK-LABEL: @matching_fp_vector_gep01_deref(
|
||||
; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds <4 x float>, <4 x float>* [[P:%.*]], i64 0, i64 1
|
||||
; CHECK-NEXT: [[R:%.*]] = load float, float* [[GEP]], align 4
|
||||
; CHECK-NEXT: ret float [[R]]
|
||||
;
|
||||
%gep = getelementptr inbounds <4 x float>, <4 x float>* %p, i64 0, i64 1
|
||||
%r = load float, float* %gep, align 4
|
||||
ret float %r
|
||||
}
|
||||
|
||||
define float @matching_fp_vector_gep10(<4 x float>* align 16 dereferenceable(32) %p) {
|
||||
; CHECK-LABEL: @matching_fp_vector_gep10(
|
||||
; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds <4 x float>, <4 x float>* [[P:%.*]], i64 1, i64 0
|
||||
; CHECK-NEXT: [[R:%.*]] = load float, float* [[GEP]], align 16
|
||||
; CHECK-NEXT: ret float [[R]]
|
||||
;
|
||||
%gep = getelementptr inbounds <4 x float>, <4 x float>* %p, i64 1, i64 0
|
||||
%r = load float, float* %gep, align 16
|
||||
ret float %r
|
||||
}
|
||||
|
||||
define float @matching_fp_vector_gep10_deref(<4 x float>* align 16 dereferenceable(31) %p) {
|
||||
; CHECK-LABEL: @matching_fp_vector_gep10_deref(
|
||||
; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds <4 x float>, <4 x float>* [[P:%.*]], i64 1, i64 0
|
||||
; CHECK-NEXT: [[R:%.*]] = load float, float* [[GEP]], align 16
|
||||
; CHECK-NEXT: ret float [[R]]
|
||||
;
|
||||
%gep = getelementptr inbounds <4 x float>, <4 x float>* %p, i64 1, i64 0
|
||||
%r = load float, float* %gep, align 16
|
||||
ret float %r
|
||||
}
|
||||
|
||||
define float @nonmatching_int_vector(<2 x i64>* align 16 dereferenceable(16) %p) {
|
||||
; CHECK-LABEL: @nonmatching_int_vector(
|
||||
; CHECK-NEXT: [[BC:%.*]] = bitcast <2 x i64>* [[P:%.*]] to float*
|
||||
|
Loading…
x
Reference in New Issue
Block a user