Skip to content

Commit ba89006

Browse files
fhahngithub-actions[bot]
authored andcommitted
Automerge: [VPlan] Get type from start value for VPWidenIntOrFpInduction (NFC).
NFC for now but this can cause verification failures in the future, since after bf5627c wide induction may be narrowed. By using the type from the start value, we will always return the correct type.
2 parents e65a2ea + 6c40569 commit ba89006

File tree

1 file changed

+2
-1
lines changed
  • llvm/lib/Transforms/Vectorize

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2004,7 +2004,8 @@ class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe {
20042004

20052005
/// Returns the scalar type of the induction.
20062006
Type *getScalarType() const {
2007-
return Trunc ? Trunc->getType() : getPHINode()->getType();
2007+
return Trunc ? Trunc->getType()
2008+
: getStartValue()->getLiveInIRValue()->getType();
20082009
}
20092010

20102011
/// Returns the VPValue representing the value of this induction at

0 commit comments

Comments
 (0)