[PATCH] D18841: [InstCombine] Canonicalize icmp instructions based on dominating conditions.

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 23:38:09 PDT 2016


majnemer added inline comments.

================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:3293
@@ +3292,3 @@
+    if (BI && match(BI, m_Br(m_ICmp(Pred, m_Specific(Op0), m_ConstantInt(CI2)),
+                             TrueBB, FalseBB))) {
+      assert(TrueBB != FalseBB && "TrueBB must not be equal to FalseBB");
----------------
This is only true for the very first iteration of InstCombine.  InstCombine adds the users of all instructions that it modifies to a worklist, this worklist is not toplogically sorted.


http://reviews.llvm.org/D18841





More information about the llvm-commits mailing list