[PATCH] D24147: Lower consecutive select instructions correctly.

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 2 15:01:09 PDT 2016


danielcdh added inline comments.

================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4553
@@ +4552,3 @@
+      return false;
+    if (SI == SI2->getTrueValue() || SI == SI2->getFalseValue())
+      return true;
----------------
vsk wrote:
> Is SI2 not dependent on SI1 if, e.g `SI2->getTrueValue() == (add SI 1)`? I'm fuzzy on what 'dependent' means in this context, sorry!
function removed

================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4556
@@ +4555,3 @@
+  }
+  assert(0 && "SI1 does not dominate SI2 in the same BB");
+  return true;
----------------
vsk wrote:
> This would be better off as an llvm_unreachable; that should let you remove the return.
removed

================
Comment at: test/CodeGen/X86/codegen-prepare-select.ll:8
@@ +7,3 @@
+; CHECK: %select.false
+; CHECK-NOT: %select.false2
+
----------------
vsk wrote:
> Please move these checks closer to the IR which produces the expected assembly.
> 
> Similarly, please move the NOT tests closer to the IR which used to produce the corresponding assembly.
remove the entire test and added to some legacy tests.


https://reviews.llvm.org/D24147





More information about the llvm-commits mailing list