diff --git a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp index 9c304d1f955c8e..bd214e004a022b 100644 --- a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp +++ b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp @@ -749,12 +749,6 @@ void State::addInfoFor(BasicBlock &BB) { static bool checkAndReplaceCondition(CmpInst *Cmp, ConstraintInfo &Info) { LLVM_DEBUG(dbgs() << "Checking " << *Cmp << "\n"); - // TODO: Implement splat of boolean value for scalable vectors. - if (isa(Cmp->getType())) { - LLVM_DEBUG(dbgs() << " skipping due to scalable vectors\n"); - return false; - } - CmpInst::Predicate Pred = Cmp->getPredicate(); Value *A = Cmp->getOperand(0); Value *B = Cmp->getOperand(1); diff --git a/llvm/test/Transforms/ConstraintElimination/geps-ptrvector.ll b/llvm/test/Transforms/ConstraintElimination/geps-ptrvector.ll index 0f5a28b3c56716..93d940f2de3bad 100644 --- a/llvm/test/Transforms/ConstraintElimination/geps-ptrvector.ll +++ b/llvm/test/Transforms/ConstraintElimination/geps-ptrvector.ll @@ -40,7 +40,7 @@ define @test.scalable.vectorgep.ult.true( %v ; CHECK-LABEL: @test.scalable.vectorgep.ult.true( ; CHECK-NEXT: [[GEP_1:%.*]] = getelementptr inbounds i32, [[VEC:%.*]], i64 1 ; CHECK-NEXT: [[T_1:%.*]] = icmp ult [[VEC]], [[GEP_1]] -; CHECK-NEXT: ret [[T_1]] +; CHECK-NEXT: ret shufflevector ( insertelement ( poison, i1 true, i32 0), poison, zeroinitializer) ; %gep.1 = getelementptr inbounds i32, %vec, i64 1 %t.1 = icmp ult %vec, %gep.1 @@ -51,7 +51,7 @@ define @test.scalable.vectorgep.ult.false( % ; CHECK-LABEL: @test.scalable.vectorgep.ult.false( ; CHECK-NEXT: [[GEP_1:%.*]] = getelementptr inbounds i32, [[VEC:%.*]], i64 1 ; CHECK-NEXT: [[T_1:%.*]] = icmp ult [[GEP_1]], [[VEC]] -; CHECK-NEXT: ret [[T_1]] +; CHECK-NEXT: ret zeroinitializer ; %gep.1 = getelementptr inbounds i32, %vec, i64 1 %t.1 = icmp ult %gep.1, %vec