Re: [PATCH] arm: Improve immediate generation for thumb-1 with -mpurecode [PR96769]

2020-09-04 Thread Richard Earnshaw
On 03/09/2020 09:24, Christophe Lyon via Gcc-patches wrote: > This patch moves the move-immediate splitter after the regular ones so > that it has lower precedence, and updates its constraints. > > For > int f3 (void) { return 0x1100; } > int f3_2 (void) { return 0x12345678; } > > we now gene

[PATCH] arm: Improve immediate generation for thumb-1 with -mpurecode [PR96769]

2020-09-03 Thread Christophe Lyon via Gcc-patches
This patch moves the move-immediate splitter after the regular ones so that it has lower precedence, and updates its constraints. For int f3 (void) { return 0x1100; } int f3_2 (void) { return 0x12345678; } we now generate: * with -O2 -mcpu=cortex-m0 -mpure-code: f3: movsr0, #136