-
Notifications
You must be signed in to change notification settings - Fork 14.6k
[VPlan] Replace RdxDesc with RecurKind in VPReductionPHIRecipe (NFC). #142322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
bc7024c
5d0c744
dca0d4b
4c2e494
0ab71f6
cb4b75d
db65c6f
0bd4d2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -301,6 +301,11 @@ class LoopVectorizationLegality { | |||||
/// Returns the reduction variables found in the loop. | ||||||
const ReductionList &getReductionVars() const { return Reductions; } | ||||||
|
||||||
RecurrenceDescriptor getRecurrenceDescriptor(PHINode *PN) const { | ||||||
assert(Reductions.contains(PN) && "no recurrence descriptor for phi"); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in split off c5fff13, thanks |
||||||
return Reductions.lookup(PN); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Independent: can search and replace several usages. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in split off c5fff13, thanks |
||||||
} | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Independent: can update below |
||||||
/// Returns the induction variables found in the loop. | ||||||
const InductionList &getInductionVars() const { return Inductions; } | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -740,8 +740,8 @@ Value *VPInstruction::generate(VPTransformState &State) { | |
Value *ReducedPartRdx = State.get(getOperand(2)); | ||
for (unsigned Idx = 3; Idx < getNumOperands(); ++Idx) | ||
ReducedPartRdx = Builder.CreateBinOp( | ||
(Instruction::BinaryOps)RecurrenceDescriptor::getOpcode( | ||
RecurKind::AnyOf), | ||
static_cast<Instruction::BinaryOps>( | ||
RecurrenceDescriptor::getOpcode(RecurKind::AnyOf)), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can be done independently. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good , will do separately, thanks |
||
State.get(getOperand(Idx)), ReducedPartRdx, "bin.rdx"); | ||
return createAnyOfReduction(Builder, ReducedPartRdx, | ||
State.get(getOperand(1), VPLane(0)), OrigPhi); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in split off c5fff13, thanks