[ConstraintElim] Drop bail out for scalable vectors after using getTrue
ConstantInt::getTrue/getFalse can materialize scalable vectors with all lanes true/false.
This commit is contained in:
parent
b36d678b8e
commit
8086b0c8a8
@ -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<ScalableVectorType>(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);
|
||||
|
||||
@ -40,7 +40,7 @@ define <vscale x 2 x i1> @test.scalable.vectorgep.ult.true(<vscale x 2 x ptr> %v
|
||||
; CHECK-LABEL: @test.scalable.vectorgep.ult.true(
|
||||
; CHECK-NEXT: [[GEP_1:%.*]] = getelementptr inbounds i32, <vscale x 2 x ptr> [[VEC:%.*]], i64 1
|
||||
; CHECK-NEXT: [[T_1:%.*]] = icmp ult <vscale x 2 x ptr> [[VEC]], [[GEP_1]]
|
||||
; CHECK-NEXT: ret <vscale x 2 x i1> [[T_1]]
|
||||
; CHECK-NEXT: ret <vscale x 2 x i1> shufflevector (<vscale x 2 x i1> insertelement (<vscale x 2 x i1> poison, i1 true, i32 0), <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer)
|
||||
;
|
||||
%gep.1 = getelementptr inbounds i32, <vscale x 2 x ptr> %vec, i64 1
|
||||
%t.1 = icmp ult <vscale x 2 x ptr> %vec, %gep.1
|
||||
@ -51,7 +51,7 @@ define <vscale x 2 x i1> @test.scalable.vectorgep.ult.false(<vscale x 2 x ptr> %
|
||||
; CHECK-LABEL: @test.scalable.vectorgep.ult.false(
|
||||
; CHECK-NEXT: [[GEP_1:%.*]] = getelementptr inbounds i32, <vscale x 2 x ptr> [[VEC:%.*]], i64 1
|
||||
; CHECK-NEXT: [[T_1:%.*]] = icmp ult <vscale x 2 x ptr> [[GEP_1]], [[VEC]]
|
||||
; CHECK-NEXT: ret <vscale x 2 x i1> [[T_1]]
|
||||
; CHECK-NEXT: ret <vscale x 2 x i1> zeroinitializer
|
||||
;
|
||||
%gep.1 = getelementptr inbounds i32, <vscale x 2 x ptr> %vec, i64 1
|
||||
%t.1 = icmp ult <vscale x 2 x ptr> %gep.1, %vec
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user