[PATCH] D33420: [LIR] Strengthen the check for recurrence variable in popcnt/CTLZ
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 23 12:50:46 PDT 2017
davide marked an inline comment as done.
davide added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:1042
+static bool checkRecurrence(Value *&VarX, Instruction *&DefX,
+ BasicBlock *LoopEntry, PHINode *&PhiX) {
+ PhiX = dyn_cast<PHINode>(VarX);
----------------
evstupac wrote:
> I wonder if you need PhiX as a parameter. It looks like it is unused after the call.
> Also it looks like the function does not modify anything, so you don't need references.
Isn't it used in `recognizeAndInsertCTLZ` ?
================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:1042
+static bool checkRecurrence(Value *&VarX, Instruction *&DefX,
+ BasicBlock *LoopEntry, PHINode *&PhiX) {
+ PhiX = dyn_cast<PHINode>(VarX);
----------------
davide wrote:
> evstupac wrote:
> > I wonder if you need PhiX as a parameter. It looks like it is unused after the call.
> > Also it looks like the function does not modify anything, so you don't need references.
> Isn't it used in `recognizeAndInsertCTLZ` ?
Yes, I removed the refs.
https://reviews.llvm.org/D33420
More information about the llvm-commits
mailing list