Hurugalawadi, Naveen writes: > Hi, > > Please find attached the patch that performs optimization on unsigned values. > > Original fold-const part implemented in match.pd. > > Please review the patch and let us know if it's OK? > > Regression Tested on X86_64 with no regressions. > > Thanks, > Naveen > > ChangeLog: > * match.pd (cmp (convert (bit_not @0)) INTEGER_CST@1): New Simplifier. > > Testsuite/ChangeLog: > * gcc.dg/pr31531.c : New testcase.
Could you please add dg-require-effective-target int32 to the test to avoid breaking targets with smaller ints (right shift by 31 bits)? Regards Senthil