[PATCH] D38100: [InstCombine] Teach getDemandedBitsLHSMask to handle constant splat vectors

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 14:55:29 PDT 2017


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:3939-3940
   case ICmpInst::ICMP_UGT: {
-    unsigned trailingOnes = RHS.countTrailingOnes();
+    unsigned trailingOnes = RHS->countTrailingOnes();
     return APInt::getBitsSetFrom(BitWidth, trailingOnes);
   }
----------------
Could squash the unnecessary local variable into the return statement to eliminate the lowercase variable violation and remove the braces.


https://reviews.llvm.org/D38100





More information about the llvm-commits mailing list