[PATCH] D35376: [InstCombine] Don't violate dominance when replacing instructions

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 00:07:28 PDT 2017


serge-sans-paille added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:3744
+          // could break the dominance relation.
+          return nullptr;
         }
----------------
Ok, i understand and agree with the rational behind this fix. Would it be reasonable to check if the operand is either a constant or defined in the same block, previous to current instruction, in order to catch more candidates?


https://reviews.llvm.org/D35376





More information about the llvm-commits mailing list