[Bug tree-optimization/69943] expressions with multiple associative operators don't always create instruction-level parallelism
ktkachov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 24 15:47:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69943
--- Comment #2 from ktkachov at gcc dot gnu.org ---
On second thought, reassociating signed addition is not legal in general
because we might introduce signed overflow where one didn't exist before.
Changing your integer example to use unsigned int instead produces the
reassociation you want (subject to TARGET_SCHED_REASSOCIATION_WIDTH limits):
sumi:
add w6, w6, w7
add w5, w4, w5
add w2, w2, w3
add w6, w6, w5
add w0, w0, w1
add w6, w6, w2
add w0, w6, w0
ret
More information about the Gcc-bugs
mailing list