Skip to content

Commit 712ef4b

Browse files
committed
!fixup address latest comments, thanks
1 parent 5cf434b commit 712ef4b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8130,9 +8130,10 @@ VPRecipeBuilder::handleReplication(Instruction *I, ArrayRef<VPValue *> Operands,
81308130
(Range.Start.isScalable() && isa<IntrinsicInst>(I))) &&
81318131
"Should not predicate a uniform recipe");
81328132
if (IsUniform && Instruction::isCast(I->getOpcode())) {
8133+
assert(!IsPredicated && "IsUniform implies unpredicated");
81338134
auto *Recipe = new VPInstructionWithType(
81348135
I->getOpcode(), Operands, I->getType(), VPIRFlags(*I), I->getDebugLoc(),
8135-
/*IsSingleScalar=*/true, I->getName());
8136+
IsUniform, I->getName());
81368137
Recipe->setUnderlyingValue(I);
81378138
return Recipe;
81388139
}

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,9 +1038,10 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
10381038
? Instruction::SExt
10391039
: Instruction::ZExt;
10401040
VPSingleDefRecipe *VPC;
1041-
if (vputils::isSingleScalar(R.getVPSingleValue()))
1041+
if (vputils::isSingleScalar(Def))
10421042
VPC = new VPInstructionWithType(Instruction::CastOps(ExtOpcode), {A},
1043-
TruncTy, {}, {});
1043+
TruncTy, {}, {},
1044+
/*IsSingleScalar=*/true);
10441045
else
10451046
VPC = new VPWidenCastRecipe(Instruction::CastOps(ExtOpcode), A,
10461047
TruncTy);

0 commit comments

Comments
 (0)