[NFC][DAGCombine][X86] '~(X - 1)' pattern tests
The fold 'A - (A & (B - 1))' -> 'A & (0 - B)' added in 8dab0a4a is too specific. It should just be 'A - (A & B)' -> 'A & (~B)', but we currently fail to sink that '~' into `(B - 1)`. Name: ~(X - 1) -> (0 - X) %o = add i32 %X, -1 %r = xor i32 %o, -1 => %r = sub i32 0, %X https://rise4fun.com/Alive/rjU
Loading
Please register or sign in to comment