Skip to content
Commit 7c4b90a9 authored by Sanjay Patel's avatar Sanjay Patel
Browse files

[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.
parent 0445c340
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment