[PATCH] Select Elimination in InstCombine
ghoflehner at apple.com
Tue Sep 30 16:40:19 PDT 2014
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:2452
@@ +2451,3 @@
+ auto *Usr = cast<Instruction>(U);
+ if (Usr != UI && !DT->dominates(DB, Usr->getParent()))
+ return false;
> hfinkel wrote:
> > If you mean for this to rule-out any other uses in the same block as the definition (I don't see anything else that might enforce that there is only one use in the parent block), should this be a call to properlyDominates?
> Very much agree. Done.
Ups, I have to take it back. DB can be a successor block of the DI parent and it may contain a use. So dominates() must be used.
More information about the llvm-commits