That check claims that the transform is illegal otherwise.
That isn't true:
- For ISD::ADD, we only process ISD::SHL outer shift => sign bit does not matter https://rise4fun.com/Alive/K4A
- For ISD::AND, there is no restriction on constants: https://rise4fun.com/Alive/Wy3
- For ISD::OR, there is no restriction on constants: https://rise4fun.com/Alive/GOH
- For ISD::XOR, there is no restriction on constants: https://rise4fun.com/Alive/ml6
So, why is it there then?
This changes the testcase that was touched by @spatel in rL347478,
but i'm not sure that test tests anything particular?
This test (and the 1 below here) wasn't resulting in 'not' asm before rL347478, so I was trying to make that happen.
This diff seems like a (slight) regression because we're turning a 32-bit 'not' into a 64-bit 'not' (extra prefix byte?), but I'm not sure if anyone cares.