Index: llvm/lib/Analysis/ValueTracking.cpp =================================================================== --- llvm/lib/Analysis/ValueTracking.cpp +++ llvm/lib/Analysis/ValueTracking.cpp @@ -375,11 +375,6 @@ static unsigned ComputeNumSignBits(const Value *V, unsigned Depth, const Query &Q) { - // FIXME: We currently have no way to represent the DemandedElts of a scalable - // vector - if (isa(V->getType())) - return 1; - auto *FVTy = dyn_cast(V->getType()); APInt DemandedElts = FVTy ? APInt::getAllOnes(FVTy->getNumElements()) : APInt(1, 1); @@ -2448,10 +2443,6 @@ /// Supports values with integer or pointer type and vectors of integers. bool isKnownNonZero(const Value *V, const APInt &DemandedElts, unsigned Depth, const Query &Q) { - // FIXME: We currently have no way to represent the DemandedElts of a scalable - // vector - if (isa(V->getType())) - return false; #ifndef NDEBUG Type *Ty = V->getType(); @@ -2739,11 +2730,6 @@ } bool isKnownNonZero(const Value* V, unsigned Depth, const Query& Q) { - // FIXME: We currently have no way to represent the DemandedElts of a scalable - // vector - if (isa(V->getType())) - return false; - auto *FVTy = dyn_cast(V->getType()); APInt DemandedElts = FVTy ? APInt::getAllOnes(FVTy->getNumElements()) : APInt(1, 1); @@ -3095,12 +3081,6 @@ const APInt &DemandedElts, unsigned Depth, const Query &Q) { Type *Ty = V->getType(); - - // FIXME: We currently have no way to represent the DemandedElts of a scalable - // vector - if (isa(Ty)) - return 1; - #ifndef NDEBUG assert(Depth <= MaxAnalysisRecursionDepth && "Limit Search Depth"); Index: llvm/test/Transforms/InstCombine/logical-select.ll =================================================================== --- llvm/test/Transforms/InstCombine/logical-select.ll +++ llvm/test/Transforms/InstCombine/logical-select.ll @@ -742,13 +742,11 @@ define @bitcast_vec_cond_scalable( %cond, %c, %d) { ; CHECK-LABEL: @bitcast_vec_cond_scalable( -; CHECK-NEXT: [[S:%.*]] = sext [[COND:%.*]] to -; CHECK-NEXT: [[T9:%.*]] = bitcast [[S]] to -; CHECK-NEXT: [[NOTT9:%.*]] = xor [[T9]], shufflevector ( insertelement ( poison, i64 -1, i32 0), poison, zeroinitializer) -; CHECK-NEXT: [[T11:%.*]] = and [[NOTT9]], [[C:%.*]] -; CHECK-NEXT: [[T12:%.*]] = and [[T9]], [[D:%.*]] -; CHECK-NEXT: [[R:%.*]] = or [[T11]], [[T12]] -; CHECK-NEXT: ret [[R]] +; CHECK-NEXT: [[TMP1:%.*]] = bitcast [[D:%.*]] to +; CHECK-NEXT: [[TMP2:%.*]] = bitcast [[C:%.*]] to +; CHECK-NEXT: [[TMP3:%.*]] = select [[COND:%.*]], [[TMP1]], [[TMP2]] +; CHECK-NEXT: [[TMP4:%.*]] = bitcast [[TMP3]] to +; CHECK-NEXT: ret [[TMP4]] ; %s = sext %cond to %t9 = bitcast %s to