[PATCH] Select Elimination in InstCombine

David Majnemer david.majnemer at gmail.com
Thu Sep 11 12:53:37 PDT 2014


================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:2438
@@ +2437,3 @@
+    auto *User = cast<Instruction>(U.getUser());
+    if (User != UI && !(DT && DT->dominates(DB, User->getParent())))
+      return false;
----------------
`DT` is invariant of this loop, you could hoist it out of the loop (return false).

http://reviews.llvm.org/D5258






More information about the llvm-commits mailing list