[PATCH] D48584: [InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 27 19:55:29 PDT 2018


mkazantsev added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:4710-4711
+  // passes, so we use it as the last resort if we cannot do anything better.
+  if (Instruction *Res = foldICmpUsingKnownBits(I))
+    return Res;
+
----------------
lebedev.ri wrote:
> Please check that there is some test that relies on this, and does not get folded by previous cases.
If we completely comment away this code, more tests fail. So yes, it actually does some useful work.


https://reviews.llvm.org/D48584





More information about the llvm-commits mailing list