[InstCombine] fix overzealous assert in icmp-shr fold
The assert was added with 0399473d and is correct for that pattern, but it is off-by-1 with the enhancement in d4f39d83. The transforms are still correct with the new pre-condition: https://alive2.llvm.org/ce/z/6_6ghm https://alive2.llvm.org/ce/z/_GTBUt And as shown in the new test, the transform is expected with 'ult' - in that case, the icmp reduces to test if the shift amount is 0.
Loading
Please sign in to comment