[llvm] r248073 - [InstCombine] FoldICmpCstShrCst didn't handle icmps of -1 in the ashr case correctly

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 20 15:42:42 PDT 2015


Nuno Lopes via llvm-commits wrote:
 > BTW, the first pattern can be relaxed a bit. This is sufficient:
 >
 > Name: Compares:1088
 > Pre: (countLeadingOnes(C1) - countLeadingOnes(C2)) > 0 && C1 == -1 && !isPowerOf2(C2)

This is covered by the existing `if (Shift > 0)` precondition.

-- Sanjoy


More information about the llvm-commits mailing list