aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-08-31 16:17:35 -0700
committerAndrew Pinski <apinski@marvell.com>2023-09-05 14:14:54 -0700
commite6bcf83989478348428c732c11e6c0f1719e9214 (patch)
tree44a1984bbcaf5cc77e7837e22cf2049589e9fc80 /gcc/c
parent244d1321340116b7780e78096356f69662fd0e18 (diff)
downloadgcc-e6bcf83989478348428c732c11e6c0f1719e9214.zip
gcc-e6bcf83989478348428c732c11e6c0f1719e9214.tar.gz
gcc-e6bcf83989478348428c732c11e6c0f1719e9214.tar.bz2
MATCH: `(nop_convert)-(convert)a` into -(convert)a if we are converting from something smaller
This allows removal of one conversion and in the case of booleans, might be able to remove the negate and the other conversion later on. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/107137 gcc/ChangeLog: * match.pd (`(nop_convert)-(convert)a`): New pattern. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/neg-cast-2.c: New test. * gcc.dg/tree-ssa/neg-cast-3.c: New test.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions