[PATCH] D38206: [InstCombine] Remove one use restriction on the shift for calls to foldICmpAndShift.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 13:29:11 PDT 2017


spatel added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:1717-1718
 
   // (X & C2) > C1 --> (X & C2) != 0, if any bit set in (X & C2) will produce a
  // result greater than C1. Also handle (X & C2) < C1 --> (X & C2) == 0.
   if (!C2->isNullValue()) {
----------------
We're also easing the restriction on this fold, right? Add another test for it too?


https://reviews.llvm.org/D38206





More information about the llvm-commits mailing list