[PATCH] Select Elimination in InstCombine
David Majnemer
david.majnemer at gmail.com
Wed Sep 10 20:34:14 PDT 2014
================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:2459-2461
@@ +2458,5 @@
+ auto *IC = dyn_cast<ICmpInst>(BI->getCondition());
+ if (!IC || IC->getOperand(0) != SI)
+ return false;
+ return true;
+}
----------------
Gerolf wrote:
> majnemer wrote:
> > You could make this `return IC && IC->getOperand(0) == SI;`
> >
> > Are we interested in doing anything if the other operand to the `ICmpInst` is the `SelectInst`?
> No, rhs is expected to be a constant.
Where do we check this?
http://reviews.llvm.org/D5258
More information about the llvm-commits
mailing list