This was mentioned in D118539.
With proof adapted from a comment there:
https://alive2.llvm.org/ce/z/AXPr3k
Differential D119060
[InstCombine] SimplifyDemandedBits - mul(x,x) is odd iff x is odd spatel on Feb 5 2022, 7:46 AM. Authored by
Details
This was mentioned in D118539. With proof adapted from a comment there:
Diff Detail
Unit Tests Event Timeline
|
Can we generalize this to something along the lines of:
if we only demand 2 low bits, then replace with and %x, 0b00001 ?