[PATCH] InstCombine: Combine select sequences into a single select

hfinkel at anl.gov hfinkel at anl.gov
Fri Feb 6 05:29:11 PST 2015


LGTM.


REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/InstCombine/InstCombineSelect.cpp:1190
@@ +1189,3 @@
+    // Note: This form potentially enables more folding to happen on the And
+    // DAGCombine will probably go back to the select sequencing form later.
+    if (TrueSI->getFalseValue() == FalseVal && TrueSI->hasOneUse()) {
----------------
The other reason this helps, which I think is worth mentioning, is that GetUnderlyingObjects (which is used both at the IR level proper in several places, and also used on MMOs by the instruction scheduler) only looks back through a fixed number of PHIs and selects. Thus, reducing the select depth makes several things more powerful "for free".

http://reviews.llvm.org/D7450

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list