[PATCH] D18841: [InstCombine] Canonicalize icmp instructions based on dominating conditions.
Balaram Makam via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 12:56:25 PDT 2016
bmakam 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)) &&
+ TrueBB != 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.
Since it isn't very obvious, to be on the safer side I have changed the assert back into a check.
http://reviews.llvm.org/D18841
More information about the llvm-commits
mailing list