Index: llvm/lib/IR/Constants.cpp =================================================================== --- llvm/lib/IR/Constants.cpp +++ llvm/lib/IR/Constants.cpp @@ -1430,12 +1430,12 @@ Type *I32Ty = Type::getInt32Ty(VTy->getContext()); // Move scalar into vector. - Constant *UndefV = UndefValue::get(VTy); - V = ConstantExpr::getInsertElement(UndefV, V, ConstantInt::get(I32Ty, 0)); + Constant *PoisonV = PoisonValue::get(VTy); + V = ConstantExpr::getInsertElement(PoisonV, V, ConstantInt::get(I32Ty, 0)); // Build shuffle mask to perform the splat. SmallVector Zeros(EC.getKnownMinValue(), 0); // Splat. - return ConstantExpr::getShuffleVector(V, UndefV, Zeros); + return ConstantExpr::getShuffleVector(V, PoisonV, Zeros); } ConstantTokenNone *ConstantTokenNone::get(LLVMContext &Context) { Index: llvm/test/Transforms/CodeGenPrepare/AArch64/gather-scatter-opt-inseltpoison.ll =================================================================== --- llvm/test/Transforms/CodeGenPrepare/AArch64/gather-scatter-opt-inseltpoison.ll +++ llvm/test/Transforms/CodeGenPrepare/AArch64/gather-scatter-opt-inseltpoison.ll @@ -73,7 +73,7 @@ define @global_struct_splat( %mask) #0 { ; CHECK-LABEL: @global_struct_splat( -; CHECK-NEXT: [[TMP1:%.*]] = call @llvm.masked.gather.nxv4i32.nxv4p0i32( shufflevector ( insertelement ( undef, i32* getelementptr inbounds (%struct.a, %struct.a* @c, i64 0, i32 1), i32 0), undef, zeroinitializer), i32 4, [[MASK:%.*]], undef) +; CHECK-NEXT: [[TMP1:%.*]] = call @llvm.masked.gather.nxv4i32.nxv4p0i32( shufflevector ( insertelement ( poison, i32* getelementptr inbounds ([[STRUCT_A:%.*]], %struct.a* @c, i64 0, i32 1), i32 0), poison, zeroinitializer), i32 4, [[MASK:%.*]], undef) ; CHECK-NEXT: ret [[TMP1]] ; %1 = insertelement poison, %struct.a* @c, i32 0 Index: llvm/test/Transforms/CodeGenPrepare/AArch64/gather-scatter-opt.ll =================================================================== --- llvm/test/Transforms/CodeGenPrepare/AArch64/gather-scatter-opt.ll +++ llvm/test/Transforms/CodeGenPrepare/AArch64/gather-scatter-opt.ll @@ -73,7 +73,7 @@ define @global_struct_splat( %mask) #0 { ; CHECK-LABEL: @global_struct_splat( -; CHECK-NEXT: [[TMP1:%.*]] = call @llvm.masked.gather.nxv4i32.nxv4p0i32( shufflevector ( insertelement ( undef, i32* getelementptr inbounds (%struct.a, %struct.a* @c, i64 0, i32 1), i32 0), undef, zeroinitializer), i32 4, [[MASK:%.*]], undef) +; CHECK-NEXT: [[TMP1:%.*]] = call @llvm.masked.gather.nxv4i32.nxv4p0i32( shufflevector ( insertelement ( poison, i32* getelementptr inbounds ([[STRUCT_A:%.*]], %struct.a* @c, i64 0, i32 1), i32 0), poison, zeroinitializer), i32 4, [[MASK:%.*]], undef) ; CHECK-NEXT: ret [[TMP1]] ; %1 = insertelement undef, %struct.a* @c, i32 0 Index: llvm/test/Transforms/InstCombine/div.ll =================================================================== --- llvm/test/Transforms/InstCombine/div.ll +++ llvm/test/Transforms/InstCombine/div.ll @@ -1058,7 +1058,7 @@ define @sdiv_by_negconst_nxv2i8( %x) { ; CHECK-LABEL: @sdiv_by_negconst_nxv2i8( -; CHECK-NEXT: [[DIV_NEG:%.*]] = sdiv [[X:%.*]], shufflevector ( insertelement ( undef, i8 108, i32 0), undef, zeroinitializer) +; CHECK-NEXT: [[DIV_NEG:%.*]] = sdiv [[X:%.*]], shufflevector ( insertelement ( poison, i8 108, i32 0), poison, zeroinitializer) ; CHECK-NEXT: ret [[DIV_NEG]] ; %div = sdiv %x, shufflevector ( insertelement ( undef, i8 -108, i32 0), undef, zeroinitializer) Index: llvm/test/Transforms/InstCombine/fdiv.ll =================================================================== --- llvm/test/Transforms/InstCombine/fdiv.ll +++ llvm/test/Transforms/InstCombine/fdiv.ll @@ -87,7 +87,7 @@ define @exact_inverse_scalable_splat( %x) { ; CHECK-LABEL: @exact_inverse_scalable_splat( -; CHECK-NEXT: [[DIV:%.*]] = fmul [[X:%.*]], shufflevector ( insertelement ( undef, float 2.500000e-01, i32 0), undef, zeroinitializer) +; CHECK-NEXT: [[DIV:%.*]] = fmul [[X:%.*]], shufflevector ( insertelement ( poison, float 2.500000e-01, i32 0), poison, zeroinitializer) ; CHECK-NEXT: ret [[DIV]] ; %div = fdiv %x, shufflevector ( insertelement ( undef, float 4.0, i32 0), undef, zeroinitializer) Index: llvm/test/Transforms/InstCombine/fmul.ll =================================================================== --- llvm/test/Transforms/InstCombine/fmul.ll +++ llvm/test/Transforms/InstCombine/fmul.ll @@ -795,7 +795,7 @@ define @fmul_fadd_distribute_scalablevec( %x) { ; CHECK-LABEL: @fmul_fadd_distribute_scalablevec( ; CHECK-NEXT: [[TMP1:%.*]] = fmul reassoc [[X:%.*]], shufflevector ( insertelement ( undef, float 6.000000e+03, i32 0), undef, zeroinitializer) -; CHECK-NEXT: [[T3:%.*]] = fadd reassoc [[TMP1]], shufflevector ( insertelement ( undef, float 1.200000e+07, i32 0), undef, zeroinitializer) +; CHECK-NEXT: [[T3:%.*]] = fadd reassoc [[TMP1]], shufflevector ( insertelement ( poison, float 1.200000e+07, i32 0), poison, zeroinitializer) ; CHECK-NEXT: ret [[T3]] ; %t1 = fadd shufflevector ( insertelement ( undef, float 2.0e+3, i32 0), undef, zeroinitializer), %x Index: llvm/test/Transforms/InstCombine/select.ll =================================================================== --- llvm/test/Transforms/InstCombine/select.ll +++ llvm/test/Transforms/InstCombine/select.ll @@ -99,7 +99,7 @@ define @test9vvec( %C, %X) { ; CHECK-LABEL: @test9vvec( -; CHECK-NEXT: [[NOT_C:%.*]] = xor [[C:%.*]], shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: [[NOT_C:%.*]] = xor [[C:%.*]], shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; CHECK-NEXT: [[R:%.*]] = select [[NOT_C]], [[X:%.*]], zeroinitializer ; CHECK-NEXT: ret [[R]] ; Index: llvm/test/Transforms/InstCombine/sub.ll =================================================================== --- llvm/test/Transforms/InstCombine/sub.ll +++ llvm/test/Transforms/InstCombine/sub.ll @@ -841,7 +841,7 @@ define @test44scalablevec( %x) { ; CHECK-LABEL: @test44scalablevec( -; CHECK-NEXT: [[SUB:%.*]] = add nsw [[X:%.*]], shufflevector ( insertelement ( undef, i32 -32768, i32 0), undef, zeroinitializer) +; CHECK-NEXT: [[SUB:%.*]] = add nsw [[X:%.*]], shufflevector ( insertelement ( poison, i32 -32768, i32 0), poison, zeroinitializer) ; CHECK-NEXT: ret [[SUB]] ; %sub = sub nsw %x, shufflevector ( insertelement ( undef, i32 32768, i32 0), undef, zeroinitializer) @@ -861,7 +861,7 @@ ; uses m_ImmConstant which matches Constant but (explicitly) not ConstantExpr. define @test44scalablevecminval( %x) { ; CHECK-LABEL: @test44scalablevecminval( -; CHECK-NEXT: [[SUB:%.*]] = add [[X:%.*]], shufflevector ( insertelement ( undef, i16 -32768, i32 0), undef, zeroinitializer) +; CHECK-NEXT: [[SUB:%.*]] = add [[X:%.*]], shufflevector ( insertelement ( poison, i16 -32768, i32 0), poison, zeroinitializer) ; CHECK-NEXT: ret [[SUB]] ; %sub = sub nsw %x, shufflevector ( insertelement ( undef, i16 -32768, i32 0), undef, zeroinitializer) Index: llvm/test/Transforms/InstCombine/zext-ctlz-trunc-to-ctlz-add.ll =================================================================== --- llvm/test/Transforms/InstCombine/zext-ctlz-trunc-to-ctlz-add.ll +++ llvm/test/Transforms/InstCombine/zext-ctlz-trunc-to-ctlz-add.ll @@ -42,7 +42,7 @@ define @trunc_ctlz_zext_nxv2i16_nxv2i64( %x) { ; CHECK-LABEL: @trunc_ctlz_zext_nxv2i16_nxv2i64( ; CHECK-NEXT: [[TMP1:%.*]] = call @llvm.ctlz.nxv2i16( [[X:%.*]], i1 false) -; CHECK-NEXT: [[ZZ:%.*]] = add nuw nsw [[TMP1]], shufflevector ( insertelement ( undef, i16 48, i32 0), undef, zeroinitializer) +; CHECK-NEXT: [[ZZ:%.*]] = add nuw nsw [[TMP1]], shufflevector ( insertelement ( poison, i16 48, i32 0), poison, zeroinitializer) ; CHECK-NEXT: ret [[ZZ]] ; %z = zext %x to @@ -74,7 +74,7 @@ ; CHECK-LABEL: @trunc_ctlz_zext_nxv2i16_nxv2i63_multiple_uses( ; CHECK-NEXT: [[Z:%.*]] = zext [[X:%.*]] to ; CHECK-NEXT: [[TMP1:%.*]] = call @llvm.ctlz.nxv2i16( [[X]], i1 true) -; CHECK-NEXT: [[ZZ:%.*]] = add nuw nsw [[TMP1]], shufflevector ( insertelement ( undef, i16 47, i32 0), undef, zeroinitializer) +; CHECK-NEXT: [[ZZ:%.*]] = add nuw nsw [[TMP1]], shufflevector ( insertelement ( poison, i16 47, i32 0), poison, zeroinitializer) ; CHECK-NEXT: call void @use1( [[Z]]) ; CHECK-NEXT: ret [[ZZ]] ; Index: llvm/test/Transforms/InstSimplify/ConstProp/vscale-inseltpoison.ll =================================================================== --- llvm/test/Transforms/InstSimplify/ConstProp/vscale-inseltpoison.ll +++ llvm/test/Transforms/InstSimplify/ConstProp/vscale-inseltpoison.ll @@ -43,7 +43,7 @@ define @sub_splat() { ; CHECK-LABEL: @sub_splat( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i32 -16, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i32 -16, i32 0), poison, zeroinitializer) ; %r = sub zeroinitializer, shufflevector ( insertelement ( undef, i32 16, i32 0), undef, zeroinitializer) ret %r @@ -262,7 +262,7 @@ define @icmp_zero() { ; CHECK-LABEL: @icmp_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %r = icmp eq zeroinitializer, zeroinitializer ret %r @@ -270,7 +270,7 @@ define @fcmp_true() { ; CHECK-LABEL: @fcmp_true( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %r = fcmp true undef, undef ret %r @@ -294,7 +294,7 @@ define @fcmp_not_equality() { ; CHECK-LABEL: @fcmp_not_equality( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %r = icmp ule undef, zeroinitializer ret %r Index: llvm/test/Transforms/InstSimplify/ConstProp/vscale.ll =================================================================== --- llvm/test/Transforms/InstSimplify/ConstProp/vscale.ll +++ llvm/test/Transforms/InstSimplify/ConstProp/vscale.ll @@ -43,7 +43,7 @@ define @sub_splat() { ; CHECK-LABEL: @sub_splat( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i32 -16, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i32 -16, i32 0), poison, zeroinitializer) ; %r = sub zeroinitializer, shufflevector ( insertelement ( undef, i32 16, i32 0), undef, zeroinitializer) ret %r @@ -262,7 +262,7 @@ define @icmp_zero() { ; CHECK-LABEL: @icmp_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %r = icmp eq zeroinitializer, zeroinitializer ret %r @@ -270,7 +270,7 @@ define @fcmp_true() { ; CHECK-LABEL: @fcmp_true( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %r = fcmp true undef, undef ret %r @@ -294,7 +294,7 @@ define @fcmp_not_equality() { ; CHECK-LABEL: @fcmp_not_equality( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %r = icmp ule undef, zeroinitializer ret %r Index: llvm/test/Transforms/InstSimplify/cmp-vec-fast-path.ll =================================================================== --- llvm/test/Transforms/InstSimplify/cmp-vec-fast-path.ll +++ llvm/test/Transforms/InstSimplify/cmp-vec-fast-path.ll @@ -13,7 +13,7 @@ define @i32cmp_eq_scalable_zero() { ; CHECK-LABEL: @i32cmp_eq_scalable_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = icmp eq zeroinitializer, zeroinitializer ret %res @@ -29,7 +29,7 @@ define @i32cmp_eq_scalable_one() { ; CHECK-LABEL: @i32cmp_eq_scalable_one( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = icmp eq shufflevector ( insertelement ( undef, i32 1, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, i32 1, i32 0), undef, zeroinitializer) ret %res @@ -109,7 +109,7 @@ define @i32cmp_uge_scalable_zero() { ; CHECK-LABEL: @i32cmp_uge_scalable_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = icmp uge zeroinitializer, zeroinitializer ret %res @@ -125,7 +125,7 @@ define @i32cmp_uge_scalable_one() { ; CHECK-LABEL: @i32cmp_uge_scalable_one( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = icmp uge shufflevector ( insertelement ( undef, i32 1, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, i32 1, i32 0), undef, zeroinitializer) ret %res @@ -173,7 +173,7 @@ define @i32cmp_ule_scalable_zero() { ; CHECK-LABEL: @i32cmp_ule_scalable_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = icmp ule zeroinitializer, zeroinitializer ret %res @@ -189,7 +189,7 @@ define @i32cmp_ule_scalable_one() { ; CHECK-LABEL: @i32cmp_ule_scalable_one( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = icmp ule shufflevector ( insertelement ( undef, i32 1, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, i32 1, i32 0), undef, zeroinitializer) ret %res @@ -237,7 +237,7 @@ define @i32cmp_sge_scalable_zero() { ; CHECK-LABEL: @i32cmp_sge_scalable_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = icmp sge zeroinitializer, zeroinitializer ret %res @@ -253,7 +253,7 @@ define @i32cmp_sge_scalable_one() { ; CHECK-LABEL: @i32cmp_sge_scalable_one( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = icmp sge shufflevector ( insertelement ( undef, i32 1, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, i32 1, i32 0), undef, zeroinitializer) ret %res @@ -301,7 +301,7 @@ define @i32cmp_sle_scalable_zero() { ; CHECK-LABEL: @i32cmp_sle_scalable_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = icmp sle zeroinitializer, zeroinitializer ret %res @@ -317,7 +317,7 @@ define @i32cmp_sle_scalable_one() { ; CHECK-LABEL: @i32cmp_sle_scalable_one( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = icmp sle shufflevector ( insertelement ( undef, i32 1, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, i32 1, i32 0), undef, zeroinitializer) ret %res @@ -365,7 +365,7 @@ define @floatcmp_oeq_scalable_zero() { ; CHECK-LABEL: @floatcmp_oeq_scalable_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp oeq zeroinitializer, zeroinitializer ret %res @@ -381,7 +381,7 @@ define @floatcmp_oeq_scalable_one() { ; CHECK-LABEL: @floatcmp_oeq_scalable_one( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp oeq shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer) ret %res @@ -429,7 +429,7 @@ define @floatcmp_oge_scalable_zero() { ; CHECK-LABEL: @floatcmp_oge_scalable_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp oge zeroinitializer, zeroinitializer ret %res @@ -445,7 +445,7 @@ define @floatcmp_oge_scalable_one() { ; CHECK-LABEL: @floatcmp_oge_scalable_one( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp oge shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer) ret %res @@ -493,7 +493,7 @@ define @floatcmp_ole_scalable_zero() { ; CHECK-LABEL: @floatcmp_ole_scalable_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp ole zeroinitializer, zeroinitializer ret %res @@ -509,7 +509,7 @@ define @floatcmp_ole_scalable_one() { ; CHECK-LABEL: @floatcmp_ole_scalable_one( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp ole shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer) ret %res @@ -557,7 +557,7 @@ define @floatcmp_ord_scalable_zero() { ; CHECK-LABEL: @floatcmp_ord_scalable_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp ord zeroinitializer, zeroinitializer ret %res @@ -573,7 +573,7 @@ define @floatcmp_ord_scalable_one() { ; CHECK-LABEL: @floatcmp_ord_scalable_one( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp ord shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer) ret %res @@ -589,7 +589,7 @@ define @floatcmp_ueq_scalable_zero() { ; CHECK-LABEL: @floatcmp_ueq_scalable_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp ueq zeroinitializer, zeroinitializer ret %res @@ -605,7 +605,7 @@ define @floatcmp_ueq_scalable_one() { ; CHECK-LABEL: @floatcmp_ueq_scalable_one( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp ueq shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer) ret %res @@ -653,7 +653,7 @@ define @floatcmp_uge_scalable_zero() { ; CHECK-LABEL: @floatcmp_uge_scalable_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp uge zeroinitializer, zeroinitializer ret %res @@ -669,7 +669,7 @@ define @floatcmp_uge_scalable_one() { ; CHECK-LABEL: @floatcmp_uge_scalable_one( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp uge shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer) ret %res @@ -717,7 +717,7 @@ define @floatcmp_ule_scalable_zero() { ; CHECK-LABEL: @floatcmp_ule_scalable_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp ule zeroinitializer, zeroinitializer ret %res @@ -733,7 +733,7 @@ define @floatcmp_ule_scalable_one() { ; CHECK-LABEL: @floatcmp_ule_scalable_one( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp ule shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer) ret %res @@ -813,7 +813,7 @@ define @floatcmp_true_scalable_zero() { ; CHECK-LABEL: @floatcmp_true_scalable_zero( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp true zeroinitializer, zeroinitializer ret %res @@ -829,7 +829,7 @@ define @floatcmp_true_scalable_one() { ; CHECK-LABEL: @floatcmp_true_scalable_one( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %res = fcmp true shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, float 1.0, i32 0), undef, zeroinitializer) ret %res Index: llvm/test/Transforms/InstSimplify/gep.ll =================================================================== --- llvm/test/Transforms/InstSimplify/gep.ll +++ llvm/test/Transforms/InstSimplify/gep.ll @@ -233,7 +233,7 @@ define @scalable_idx_scalar() { ; CHECK-LABEL: @scalable_idx_scalar( -; CHECK-NEXT: ret getelementptr (i32, zeroinitializer, shufflevector ( insertelement ( undef, i64 1, i32 0), undef, zeroinitializer)) +; CHECK-NEXT: ret getelementptr (i32, zeroinitializer, shufflevector ( insertelement ( poison, i64 1, i32 0), poison, zeroinitializer)) ; %gep = getelementptr i32, zeroinitializer, i64 1 ret %gep Index: llvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll =================================================================== --- llvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll +++ llvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll @@ -132,9 +132,9 @@ define @cmp_le_smax_always_true( %x) { ; CHECK-LABEL: @cmp_le_smax_always_true( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; - %cmp = icmp sle %x, shufflevector ( insertelement ( undef, i64 9223372036854775807, i32 0), undef, zeroinitializer) + %cmp = icmp sle %x, shufflevector ( insertelement ( poison, i64 9223372036854775807, i32 0), poison, zeroinitializer) ret %cmp } Index: llvm/test/Transforms/InstSimplify/vscale.ll =================================================================== --- llvm/test/Transforms/InstSimplify/vscale.ll +++ llvm/test/Transforms/InstSimplify/vscale.ll @@ -132,9 +132,9 @@ define @cmp_le_smax_always_true( %x) { ; CHECK-LABEL: @cmp_le_smax_always_true( -; CHECK-NEXT: ret shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; - %cmp = icmp sle %x, shufflevector ( insertelement ( undef, i64 9223372036854775807, i32 0), undef, zeroinitializer) + %cmp = icmp sle %x, shufflevector ( insertelement ( poison, i64 9223372036854775807, i32 0), poison, zeroinitializer) ret %cmp } Index: llvm/test/Transforms/LoopVectorize/AArch64/first-order-recurrence.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/AArch64/first-order-recurrence.ll +++ llvm/test/Transforms/LoopVectorize/AArch64/first-order-recurrence.ll @@ -70,7 +70,7 @@ ; CHECK-VF4UF1-LABEL: @PR34711 ; CHECK-VF4UF1: vector.body ; CHECK-VF4UF1: %[[VEC_RECUR:.*]] = phi [ %vector.recur.init, %vector.ph ], [ %[[MGATHER:.*]], %vector.body ] -; CHECK-VF4UF1: %[[MGATHER]] = call @llvm.masked.gather.nxv4i16.nxv4p0i16( {{.*}}, i32 2, shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer), undef) +; CHECK-VF4UF1: %[[MGATHER]] = call @llvm.masked.gather.nxv4i16.nxv4p0i16( {{.*}}, i32 2, shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer), undef) ; CHECK-VF4UF1-NEXT: %[[SPLICE:.*]] = call @llvm.experimental.vector.splice.nxv4i16( %[[VEC_RECUR]], %[[MGATHER]], i32 -1) ; CHECK-VF4UF1-NEXT: %[[SXT1:.*]] = sext %[[SPLICE]] to ; CHECK-VF4UF1-NEXT: %[[SXT2:.*]] = sext %[[MGATHER]] to Index: llvm/test/Transforms/LoopVectorize/AArch64/scalable-strict-fadd.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/AArch64/scalable-strict-fadd.ll +++ llvm/test/Transforms/LoopVectorize/AArch64/scalable-strict-fadd.ll @@ -15,7 +15,7 @@ ; CHECK-UNORDERED-LABEL: @fadd_strict ; CHECK-UNORDERED: vector.body -; CHECK-UNORDERED: %[[VEC_PHI:.*]] = phi [ insertelement ( shufflevector ( insertelement ( undef, float -0.000000e+00, i32 0), undef, zeroinitializer), float 0.000000e+00, i32 0), %vector.ph ], [ %[[FADD_VEC:.*]], %vector.body ] +; CHECK-UNORDERED: %[[VEC_PHI:.*]] = phi [ insertelement ( shufflevector ( insertelement ( poison, float -0.000000e+00, i32 0), poison, zeroinitializer), float 0.000000e+00, i32 0), %vector.ph ], [ %[[FADD_VEC:.*]], %vector.body ] ; CHECK-UNORDERED: %[[LOAD_VEC:.*]] = load , * ; CHECK-UNORDERED: %[[FADD_VEC]] = fadd %[[LOAD_VEC]], %[[VEC_PHI]] ; CHECK-UNORDERED-NOT: call float @llvm.vector.reduce.fadd @@ -67,10 +67,10 @@ ; CHECK-UNORDERED-LABEL: @fadd_strict_unroll ; CHECK-UNORDERED: vector.body -; CHECK-UNORDERED: %[[VEC_PHI1:.*]] = phi [ insertelement ( shufflevector ( insertelement ( undef, float -0.000000e+00, i32 0), undef, zeroinitializer), float 0.000000e+00, i32 0), %vector.ph ], [ %[[VEC_FADD1:.*]], %vector.body ] -; CHECK-UNORDERED: %[[VEC_PHI2:.*]] = phi [ shufflevector ( insertelement ( undef, float -0.000000e+00, i32 0), undef, zeroinitializer), %vector.ph ], [ %[[VEC_FADD2:.*]], %vector.body ] -; CHECK-UNORDERED: %[[VEC_PHI3:.*]] = phi [ shufflevector ( insertelement ( undef, float -0.000000e+00, i32 0), undef, zeroinitializer), %vector.ph ], [ %[[VEC_FADD3:.*]], %vector.body ] -; CHECK-UNORDERED: %[[VEC_PHI4:.*]] = phi [ shufflevector ( insertelement ( undef, float -0.000000e+00, i32 0), undef, zeroinitializer), %vector.ph ], [ %[[VEC_FADD4:.*]], %vector.body ] +; CHECK-UNORDERED: %[[VEC_PHI1:.*]] = phi [ insertelement ( shufflevector ( insertelement ( poison, float -0.000000e+00, i32 0), poison, zeroinitializer), float 0.000000e+00, i32 0), %vector.ph ], [ %[[VEC_FADD1:.*]], %vector.body ] +; CHECK-UNORDERED: %[[VEC_PHI2:.*]] = phi [ shufflevector ( insertelement ( poison, float -0.000000e+00, i32 0), poison, zeroinitializer), %vector.ph ], [ %[[VEC_FADD2:.*]], %vector.body ] +; CHECK-UNORDERED: %[[VEC_PHI3:.*]] = phi [ shufflevector ( insertelement ( poison, float -0.000000e+00, i32 0), poison, zeroinitializer), %vector.ph ], [ %[[VEC_FADD3:.*]], %vector.body ] +; CHECK-UNORDERED: %[[VEC_PHI4:.*]] = phi [ shufflevector ( insertelement ( poison, float -0.000000e+00, i32 0), poison, zeroinitializer), %vector.ph ], [ %[[VEC_FADD4:.*]], %vector.body ] ; CHECK-UNORDERED: %[[VEC_LOAD1:.*]] = load , * ; CHECK-UNORDERED: %[[VEC_LOAD2:.*]] = load , * ; CHECK-UNORDERED: %[[VEC_LOAD3:.*]] = load , * @@ -128,11 +128,11 @@ ; CHECK-ORDERED: %[[VEC_PHI1:.*]] = phi float [ %[[LOAD1]], %vector.ph ], [ %[[RDX1:.*]], %vector.body ] ; CHECK-ORDERED: %[[VEC_IND:.*]] = phi [ %[[INDUCTION]], %vector.ph ], [ {{.*}}, %vector.body ] ; CHECK-ORDERED: %[[GEP1:.*]] = getelementptr inbounds float, float* %b, %[[VEC_IND]] -; CHECK-ORDERED: %[[MGATHER1:.*]] = call @llvm.masked.gather.nxv4f32.nxv4p0f32( %[[GEP1]], i32 4, shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer), undef) +; CHECK-ORDERED: %[[MGATHER1:.*]] = call @llvm.masked.gather.nxv4f32.nxv4p0f32( %[[GEP1]], i32 4, shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer), undef) ; CHECK-ORDERED: %[[RDX1]] = call float @llvm.vector.reduce.fadd.nxv4f32(float %[[VEC_PHI1]], %[[MGATHER1]]) ; CHECK-ORDERED: %[[OR:.*]] = or %[[VEC_IND]], shufflevector ( insertelement ( poison, i64 1, i32 0), poison, zeroinitializer) ; CHECK-ORDERED: %[[GEP2:.*]] = getelementptr inbounds float, float* %b, %[[OR]] -; CHECK-ORDERED: %[[MGATHER2:.*]] = call @llvm.masked.gather.nxv4f32.nxv4p0f32( %[[GEP2]], i32 4, shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer), undef) +; CHECK-ORDERED: %[[MGATHER2:.*]] = call @llvm.masked.gather.nxv4f32.nxv4p0f32( %[[GEP2]], i32 4, shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer), undef) ; CHECK-ORDERED: %[[RDX2]] = call float @llvm.vector.reduce.fadd.nxv4f32(float %[[VEC_PHI2]], %[[MGATHER2]]) ; CHECK-ORDERED: for.end ; CHECK-ORDERED: ret void @@ -143,8 +143,8 @@ ; CHECK-UNORDERED: %[[LOAD1:.*]] = load float, float* %a ; CHECK-UNORDERED: %[[LOAD2:.*]] = load float, float* %[[ARRAYIDX]] ; CHECK-UNORDERED: vector.ph -; CHECK-UNORDERED: %[[INS_ELT2:.*]] = insertelement shufflevector ( insertelement ( undef, float -0.000000e+00, i32 0), undef, zeroinitializer), float %[[LOAD2]], i32 0 -; CHECK-UNORDERED: %[[INS_ELT1:.*]] = insertelement shufflevector ( insertelement ( undef, float -0.000000e+00, i32 0), undef, zeroinitializer), float %[[LOAD1]], i32 0 +; CHECK-UNORDERED: %[[INS_ELT2:.*]] = insertelement shufflevector ( insertelement ( poison, float -0.000000e+00, i32 0), poison, zeroinitializer), float %[[LOAD2]], i32 0 +; CHECK-UNORDERED: %[[INS_ELT1:.*]] = insertelement shufflevector ( insertelement ( poison, float -0.000000e+00, i32 0), poison, zeroinitializer), float %[[LOAD1]], i32 0 ; CHECK-UNORDERED: %[[STEPVEC1:.*]] = call @llvm.experimental.stepvector.nxv4i64() ; CHECK-UNORDERED: %[[STEPVEC_ADD1:.*]] = add %[[STEPVEC1]], shufflevector ( insertelement ( poison, i64 0, i32 0), poison, zeroinitializer) ; CHECK-UNORDERED: %[[STEPVEC_MUL:.*]] = mul %[[STEPVEC_ADD1]], shufflevector ( insertelement ( poison, i64 2, i32 0), poison, zeroinitializer) @@ -153,11 +153,11 @@ ; CHECK-UNORDERED: %[[VEC_PHI2:.*]] = phi [ %[[INS_ELT2]], %vector.ph ], [ %[[VEC_FADD2:.*]], %vector.body ] ; CHECK-UNORDERED: %[[VEC_PHI1:.*]] = phi [ %[[INS_ELT1]], %vector.ph ], [ %[[VEC_FADD1:.*]], %vector.body ] ; CHECK-UNORDERED: %[[GEP1:.*]] = getelementptr inbounds float, float* %b, -; CHECK-UNORDERED: %[[MGATHER1:.*]] = call @llvm.masked.gather.nxv4f32.nxv4p0f32( %[[GEP1]], i32 4, shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer), undef) +; CHECK-UNORDERED: %[[MGATHER1:.*]] = call @llvm.masked.gather.nxv4f32.nxv4p0f32( %[[GEP1]], i32 4, shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer), undef) ; CHECK-UNORDERED: %[[VEC_FADD1]] = fadd %[[MGATHER1]], %[[VEC_PHI1]] ; CHECK-UNORDERED: %[[OR:.*]] = or {{.*}}, shufflevector ( insertelement ( poison, i64 1, i32 0), poison, zeroinitializer) ; CHECK-UNORDERED: %[[GEP2:.*]] = getelementptr inbounds float, float* %b, %[[OR]] -; CHECK-UNORDERED: %[[MGATHER2:.*]] = call @llvm.masked.gather.nxv4f32.nxv4p0f32( %[[GEP2]], i32 4, shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer), undef) +; CHECK-UNORDERED: %[[MGATHER2:.*]] = call @llvm.masked.gather.nxv4f32.nxv4p0f32( %[[GEP2]], i32 4, shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer), undef) ; CHECK-UNORDERED: %[[VEC_FADD2]] = fadd %[[MGATHER2]], %[[VEC_PHI2]] ; CHECK-UNORDERED-NOT: call float @llvm.vector.reduce.fadd ; CHECK-UNORDERED: middle.block @@ -221,7 +221,7 @@ ; CHECK-UNORDERED-LABEL: @fadd_of_sum ; CHECK-UNORDERED: vector.body -; CHECK-UNORDERED: %[[VEC_PHI:.*]] = phi [ insertelement ( shufflevector ( insertelement ( undef, float -0.000000e+00, i32 0), undef, zeroinitializer), float 0.000000e+00, i32 0), %vector.ph ], [ %[[VEC_FADD2:.*]], %vector.body ] +; CHECK-UNORDERED: %[[VEC_PHI:.*]] = phi [ insertelement ( shufflevector ( insertelement ( poison, float -0.000000e+00, i32 0), poison, zeroinitializer), float 0.000000e+00, i32 0), %vector.ph ], [ %[[VEC_FADD2:.*]], %vector.body ] ; CHECK-UNORDERED: %[[VEC_LOAD1:.*]] = load , * ; CHECK-UNORDERED: %[[VEC_LOAD2:.*]] = load , * ; CHECK-UNORDERED: %[[VEC_FADD1:.*]] = fadd %[[VEC_LOAD1]], %[[VEC_LOAD2]] @@ -274,7 +274,7 @@ ; CHECK-ORDERED: %[[LOAD:.*]] = load , * ; CHECK-ORDERED: %[[FCMP:.*]] = fcmp une %[[LOAD]], shufflevector ( insertelement ( poison, float 0.000000e+00, i32 0), poison, zeroinitializer) ; CHECK-ORDERED: %[[MASKED_LOAD:.*]] = call @llvm.masked.load.nxv4f32.p0nxv4f32(* {{.*}}, i32 4, %[[FCMP]], poison) -; CHECK-ORDERED: %[[XOR:.*]] = xor %[[FCMP]], shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-ORDERED: %[[XOR:.*]] = xor %[[FCMP]], shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; CHECK-ORDERED: %[[SELECT:.*]] = select %[[XOR]], shufflevector ( insertelement ( poison, float 3.000000e+00, i32 0), poison, zeroinitializer), %[[MASKED_LOAD]] ; CHECK-ORDERED: %[[RDX]] = call float @llvm.vector.reduce.fadd.nxv4f32(float %[[VEC_PHI]], %[[SELECT]]) ; CHECK-ORDERED: scalar.ph @@ -292,11 +292,11 @@ ; CHECK-UNORDERED-LABEL: @fadd_conditional ; CHECK-UNORDERED: vector.body -; CHECK-UNORDERED: %[[VEC_PHI:.*]] = phi [ insertelement ( shufflevector ( insertelement ( undef, float -0.000000e+00, i32 0), undef, zeroinitializer), float 1.000000e+00, i32 0), %vector.ph ], [ %[[VEC_FADD:.*]], %vector.body ] +; CHECK-UNORDERED: %[[VEC_PHI:.*]] = phi [ insertelement ( shufflevector ( insertelement ( poison, float -0.000000e+00, i32 0), poison, zeroinitializer), float 1.000000e+00, i32 0), %vector.ph ], [ %[[VEC_FADD:.*]], %vector.body ] ; CHECK-UNORDERED: %[[LOAD1:.*]] = load , * ; CHECK-UNORDERED: %[[FCMP:.*]] = fcmp une %[[LOAD1]], shufflevector ( insertelement ( poison, float 0.000000e+00, i32 0), poison, zeroinitializer) ; CHECK-UNORDERED: %[[MASKED_LOAD:.*]] = call @llvm.masked.load.nxv4f32.p0nxv4f32(* {{.*}}, i32 4, %[[FCMP]], poison) -; CHECK-UNORDERED: %[[XOR:.*]] = xor %[[FCMP]], shufflevector ( insertelement ( undef, i1 true, i32 0), undef, zeroinitializer) +; CHECK-UNORDERED: %[[XOR:.*]] = xor %[[FCMP]], shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; CHECK-UNORDERED: %[[SELECT:.*]] = select %[[XOR]], shufflevector ( insertelement ( poison, float 3.000000e+00, i32 0), poison, zeroinitializer), %[[MASKED_LOAD]] ; CHECK-UNORDERED: %[[VEC_FADD]] = fadd %[[VEC_PHI]], %[[SELECT]] ; CHECK-UNORDERED-NOT: call float @llvm.vector.reduce.fadd @@ -348,7 +348,7 @@ ; CHECK-UNORDERED-LABEL: @fadd_multiple ; CHECK-UNORDERED: vector.body -; CHECK-UNORDERED: %[[PHI:.*]] = phi [ insertelement ( shufflevector ( insertelement ( undef, float -0.000000e+00, i32 0), undef, zeroinitializer), float -0.000000e+00, i32 0), %vector.ph ], [ %[[VEC_FADD2:.*]], %vector.body ] +; CHECK-UNORDERED: %[[PHI:.*]] = phi [ insertelement ( shufflevector ( insertelement ( poison, float -0.000000e+00, i32 0), poison, zeroinitializer), float -0.000000e+00, i32 0), %vector.ph ], [ %[[VEC_FADD2:.*]], %vector.body ] ; CHECK-UNORDERED: %[[VEC_LOAD1:.*]] = load , ; CHECK-UNORDERED: %[[VEC_FADD1:.*]] = fadd %[[PHI]], %[[VEC_LOAD1]] ; CHECK-UNORDERED: %[[VEC_LOAD2:.*]] = load , Index: llvm/test/Transforms/LoopVectorize/AArch64/sve-gather-scatter.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/AArch64/sve-gather-scatter.ll +++ llvm/test/Transforms/LoopVectorize/AArch64/sve-gather-scatter.ll @@ -132,7 +132,7 @@ ; CHECK-DAG: %[[IDXSPLATINS:.*]] = insertelement poison, i64 %[[IDX]], i32 0 ; CHECK-DAG: %[[IDXSPLAT:.*]] = shufflevector %[[IDXSPLATINS]], poison, zeroinitializer ; CHECK: %[[ADD:.*]] = add %[[IDXSPLAT]], %[[STEP]] -; CHECK: %[[MUL:.*]] = shl %[[ADD]], shufflevector ( insertelement ( undef, i64 1, i32 0), undef, zeroinitializer) +; CHECK: %[[MUL:.*]] = shl %[[ADD]], shufflevector ( insertelement ( poison, i64 1, i32 0), poison, zeroinitializer) ; CHECK: %[[PTRS:.*]] = getelementptr inbounds float, float* %b, %[[MUL]] ; CHECK: call @llvm.masked.gather.nxv4f32.nxv4p0f32( %[[PTRS]] entry: Index: llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-phi.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-phi.ll +++ llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-phi.ll @@ -20,13 +20,13 @@ ; CHECK-NEXT: [[TMP6:%.*]] = shl i64 [[TMP5]], 2 ; CHECK-NEXT: [[TMP7:%.*]] = shl i64 [[TMP5]], 4 ; CHECK-NEXT: [[TMP8:%.*]] = call @llvm.experimental.stepvector.nxv4i64() -; CHECK-NEXT: [[VECTOR_GEP:%.*]] = shl [[TMP8]], shufflevector ( insertelement ( undef, i64 1, i32 0), undef, zeroinitializer) +; CHECK-NEXT: [[VECTOR_GEP:%.*]] = shl [[TMP8]], shufflevector ( insertelement ( poison, i64 1, i32 0), poison, zeroinitializer) ; CHECK-NEXT: [[TMP9:%.*]] = getelementptr i32, i32* [[POINTER_PHI]], [[VECTOR_GEP]] ; CHECK-NEXT: [[DOTSPLATINSERT2:%.*]] = insertelement poison, i64 [[TMP6]], i32 0 ; CHECK-NEXT: [[DOTSPLAT3:%.*]] = shufflevector [[DOTSPLATINSERT2]], poison, zeroinitializer ; CHECK-NEXT: [[TMP10:%.*]] = call @llvm.experimental.stepvector.nxv4i64() ; CHECK-NEXT: [[TMP11:%.*]] = add [[DOTSPLAT3]], [[TMP10]] -; CHECK-NEXT: [[VECTOR_GEP4:%.*]] = shl [[TMP11]], shufflevector ( insertelement ( undef, i64 1, i32 0), undef, zeroinitializer) +; CHECK-NEXT: [[VECTOR_GEP4:%.*]] = shl [[TMP11]], shufflevector ( insertelement ( poison, i64 1, i32 0), poison, zeroinitializer) ; CHECK-NEXT: [[TMP12:%.*]] = getelementptr i32, i32* [[POINTER_PHI]], [[VECTOR_GEP4]] ; CHECK-NEXT: [[TMP13:%.*]] = getelementptr inbounds i32, [[TMP9]], i64 1 ; CHECK-NEXT: [[TMP14:%.*]] = getelementptr inbounds i32, [[TMP12]], i64 1 Index: llvm/test/Transforms/LoopVectorize/scalable-first-order-recurrence.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/scalable-first-order-recurrence.ll +++ llvm/test/Transforms/LoopVectorize/scalable-first-order-recurrence.ll @@ -171,9 +171,9 @@ define void @constant_folded_previous_value() { ; CHECK-VF4UF2-LABEL: @constant_folded_previous_value ; CHECK-VF4UF2: vector.body -; CHECK-VF4UF2: %[[VECTOR_RECUR:.*]] = phi [ %vector.recur.init, %vector.ph ], [ shufflevector ( insertelement ( undef, i64 1, i32 0), undef, zeroinitializer), %vector.body ] -; CHECK-VF4UF2: %[[SPLICE1:.*]] = call @llvm.experimental.vector.splice.nxv4i64( %vector.recur, shufflevector ( insertelement ( undef, i64 1, i32 0), undef, zeroinitializer), i32 -1) -; CHECK-VF4UF2: %[[SPLICE2:.*]] = call @llvm.experimental.vector.splice.nxv4i64( shufflevector ( insertelement ( undef, i64 1, i32 0), undef, zeroinitializer), shufflevector ( insertelement ( undef, i64 1, i32 0), undef, zeroinitializer), i32 -1) +; CHECK-VF4UF2: %[[VECTOR_RECUR:.*]] = phi [ %vector.recur.init, %vector.ph ], [ shufflevector ( insertelement ( poison, i64 1, i32 0), poison, zeroinitializer), %vector.body ] +; CHECK-VF4UF2: %[[SPLICE1:.*]] = call @llvm.experimental.vector.splice.nxv4i64( %vector.recur, shufflevector ( insertelement ( poison, i64 1, i32 0), poison, zeroinitializer), i32 -1) +; CHECK-VF4UF2: %[[SPLICE2:.*]] = call @llvm.experimental.vector.splice.nxv4i64( shufflevector ( insertelement ( poison, i64 1, i32 0), poison, zeroinitializer), shufflevector ( insertelement ( poison, i64 1, i32 0), poison, zeroinitializer), i32 -1) ; CHECK-VF4UF2: br i1 {{.*}}, label %middle.block, label %vector.body entry: br label %scalar.body Index: llvm/test/Transforms/LoopVectorize/scalable-inductions.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/scalable-inductions.ll +++ llvm/test/Transforms/LoopVectorize/scalable-inductions.ll @@ -102,7 +102,7 @@ ; CHECK-LABEL: @add_unique_ind32( ; CHECK: vector.ph: ; CHECK: %[[STEPVEC:.*]] = call @llvm.experimental.stepvector.nxv4i32() -; CHECK-NEXT: %[[INDINIT:.*]] = shl %[[STEPVEC]], shufflevector ( insertelement ( undef, i32 1, i32 0), undef, zeroinitializer) +; CHECK-NEXT: %[[INDINIT:.*]] = shl %[[STEPVEC]], shufflevector ( insertelement ( poison, i32 1, i32 0), poison, zeroinitializer) ; CHECK-NEXT: %[[VSCALE:.*]] = call i32 @llvm.vscale.i32() ; CHECK-NEXT: %[[INC:.*]] = shl i32 %[[VSCALE]], 3 ; CHECK-NEXT: %[[TMP:.*]] = insertelement poison, i32 %[[INC]], i32 0