[Bug target/44883] Combine separate shift and add instructions into a single one

2021-09-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44883 --- Comment #5 from Andrew Pinski --- In GCC 9+ (due to 2->2 combine) we get: .L2: cmp r4, r5 blt .L3 pop {r4, r5, r6, r7, r8, pc} .L3: ldr r3, [r6] lslsr2, r4, #5 add r8, r3

[Bug target/44883] Combine separate shift and add instructions into a single one

2010-07-09 Thread carrot at google dot com
--- Comment #4 from carrot at google dot com 2010-07-09 22:11 --- Consider following case: add r3, r1, r2 ldr r4, [r3] Suppose there is no other usage of r3, propagate the first instruction into the second and remove the first is the correct behavior and beneficial. This is als

[Bug target/44883] Combine separate shift and add instructions into a single one

2010-07-08 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2010-07-09 00:06 --- (In reply to comment #2) > Give it a single register, the cost is 6. Give it the rtx (plus (reg 144) (reg > 143)), the cost is 4. So a single register is more expensive than a plus > expression, not reasonable. And

[Bug target/44883] Combine separate shift and add instructions into a single one

2010-07-08 Thread carrot at google dot com
--- Comment #2 from carrot at google dot com 2010-07-09 00:04 --- (In reply to comment #1) > >So in function fwprop_addr before deciding propagate an expression should we > also check if it is the only use of the corresponding def? > > It does somewhat. Though address cost might be low

[Bug target/44883] Combine separate shift and add instructions into a single one

2010-07-08 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2010-07-08 23:22 --- >So in function fwprop_addr before deciding propagate an expression should we also check if it is the only use of the corresponding def? It does somewhat. Though address cost might be lower for r2+r3 than just r8.