[PATCH] Select Elimination in InstCombine

Gerolf Hoflehner ghoflehner at apple.com
Tue Sep 30 15:54:30 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.

http://reviews.llvm.org/D5258






More information about the llvm-commits mailing list