summaryrefslogtreecommitdiff
path: root/polly
diff options
context:
space:
mode:
authorPaul Walker <paul.walker@arm.com>2023-01-04 11:45:54 +0000
committerPaul Walker <paul.walker@arm.com>2023-01-11 14:08:06 +0000
commiteae26b6640afff715172d75fdee02e7df7530a9b (patch)
treea824244d3b6a9297bfa853bf6f7e2596f730e44f /polly
parent4313b6f9ebc2556ff039249691a4dc619e32840c (diff)
downloadllvm-eae26b6640afff715172d75fdee02e7df7530a9b.tar.gz
[IRBuilder] Use canonical i64 type for insertelement index used by vector splats.
Instcombine prefers this canonical form (see getPreferredVectorIndex), as does IRBuilder when passing the index as an integer so we may as well use the prefered form from creation. NOTE: All test changes are mechanical with nothing else expected beyond a change of index type from i32 to i64. Differential Revision: https://reviews.llvm.org/D140983
Diffstat (limited to 'polly')
-rw-r--r--polly/test/CodeGen/invariant_load_hoist_alignment.ll2
-rw-r--r--polly/test/CodeGen/simple_vec_cast.ll2
-rw-r--r--polly/test/CodeGen/simple_vec_const.ll2
-rw-r--r--polly/test/CodeGen/simple_vec_ptr_ptr_ty.ll2
4 files changed, 4 insertions, 4 deletions
diff --git a/polly/test/CodeGen/invariant_load_hoist_alignment.ll b/polly/test/CodeGen/invariant_load_hoist_alignment.ll
index 59f92cbc361f..ef6823be3421 100644
--- a/polly/test/CodeGen/invariant_load_hoist_alignment.ll
+++ b/polly/test/CodeGen/invariant_load_hoist_alignment.ll
@@ -17,7 +17,7 @@ body:
%indvar = phi i64 [ 0, %entry ], [ %indvar_next, %body ]
%scevgep = getelementptr [1024 x i32], [1024 x i32]* @B, i64 0, i64 %indvar
; CHECK: [[T2:%.load]] = load i32, i32* getelementptr inbounds ([1024 x i32], [1024 x i32]* @A, i32 0, i32 0), align 4
-; CHECK: %value_p.splatinsert = insertelement <4 x i32> poison, i32 [[T2]], i32 0
+; CHECK: %value_p.splatinsert = insertelement <4 x i32> poison, i32 [[T2]], i64 0
%value = load i32, i32* getelementptr inbounds ([1024 x i32], [1024 x i32]* @A, i64 0, i64 0), align 4
%result = tail call i32 @foo(i32 %value) nounwind
store i32 %result, i32* %scevgep, align 4
diff --git a/polly/test/CodeGen/simple_vec_cast.ll b/polly/test/CodeGen/simple_vec_cast.ll
index c3ee183fcedb..1fe989d016c5 100644
--- a/polly/test/CodeGen/simple_vec_cast.ll
+++ b/polly/test/CodeGen/simple_vec_cast.ll
@@ -32,7 +32,7 @@ bb4: ; preds = %bb1
; CHECK: %.load = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i32 0, i32 0)
; CHECK: polly.stmt.bb2: ; preds = %polly.start
-; CHECK: %tmp_p.splatinsert = insertelement <4 x float> poison, float %.load, i32 0
+; CHECK: %tmp_p.splatinsert = insertelement <4 x float> poison, float %.load, i64 0
; CHECK: %tmp_p.splat = shufflevector <4 x float> %tmp_p.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
; CHECK: %0 = fpext <4 x float> %tmp_p.splat to <4 x double>
; CHECK: store <4 x double> %0, <4 x double>*
diff --git a/polly/test/CodeGen/simple_vec_const.ll b/polly/test/CodeGen/simple_vec_const.ll
index f3641c1f3931..c9b134d3384b 100644
--- a/polly/test/CodeGen/simple_vec_const.ll
+++ b/polly/test/CodeGen/simple_vec_const.ll
@@ -56,5 +56,5 @@ define i32 @main() nounwind {
; CHECK: %.load = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i32 0, i32 0)
; CHECK: polly.stmt.: ; preds = %polly.start
-; CHECK: %_p.splatinsert = insertelement <4 x float> poison, float %.load, i32 0
+; CHECK: %_p.splatinsert = insertelement <4 x float> poison, float %.load, i64 0
; CHECK: %_p.splat = shufflevector <4 x float> %_p.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
diff --git a/polly/test/CodeGen/simple_vec_ptr_ptr_ty.ll b/polly/test/CodeGen/simple_vec_ptr_ptr_ty.ll
index b645ece1ceff..d55676578897 100644
--- a/polly/test/CodeGen/simple_vec_ptr_ptr_ty.ll
+++ b/polly/test/CodeGen/simple_vec_ptr_ptr_ty.ll
@@ -26,6 +26,6 @@ return:
; CHECK: %.load = load float**, float*** getelementptr inbounds ([1024 x float**], [1024 x float**]* @A, i32 0, i32 0)
; CHECK-NOT: load <1 x float**>
-; CHECK: %value_p.splatinsert = insertelement <4 x float**> poison, float** %.load, i32 0
+; CHECK: %value_p.splatinsert = insertelement <4 x float**> poison, float** %.load, i64 0
; CHECK: %value_p.splat = shufflevector <4 x float**> %value_p.splatinsert, <4 x float**> poison, <4 x i32> zeroinitializer
; CHECK: store <4 x float**> %value_p.splat, <4 x float**>* bitcast ([1024 x float**]* @B to <4 x float**>*), align 8