aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-loop-distribution.c
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2021-11-15 09:31:20 +0000
committerAndrew Pinski <apinski@marvell.com>2021-11-17 23:39:48 +0000
commit32221357007666124409ec3ee0d3a1cf263ebc9e (patch)
treebc6326db16958cb79de85d32acaca9d9c34f05df /gcc/tree-loop-distribution.c
parent0e4a8656e818b669129a670057cbc21e5b723c18 (diff)
downloadgcc-32221357007666124409ec3ee0d3a1cf263ebc9e.zip
gcc-32221357007666124409ec3ee0d3a1cf263ebc9e.tar.gz
gcc-32221357007666124409ec3ee0d3a1cf263ebc9e.tar.bz2
Fix PR tree-optimization/103228 and 103228: folding of (type) X op CST where type is a nop convert
Currently we fold (type) X op CST into (type) (X op ((type-x) CST)) when the conversion widens but not when the conversion is a nop. For the same reason why we move the widening conversion (the possibility of removing an extra conversion), we should do the same if the conversion is a nop. Committed as approved with the comment change. PR tree-optimization/103228 PR tree-optimization/55177 gcc/ChangeLog: * match.pd ((type) X bitop CST): Also do this transformation for nop conversions. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr103228-1.c: New test. * gcc.dg/tree-ssa/pr55177-1.c: New test.
Diffstat (limited to 'gcc/tree-loop-distribution.c')
0 files changed, 0 insertions, 0 deletions