aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/constructor.h
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2025-03-03 15:30:58 +0000
committerRichard Earnshaw <rearnsha@arm.com>2025-03-03 16:53:05 +0000
commit2a502f9e4c5c6a8e908ef1b0b5c03fb2e4bd4390 (patch)
tree6ad134253ee817487c265682b941efb6467466ce /gcc/fortran/constructor.h
parentebc6c54e1f84170d591aa44c4a589c0164436a02 (diff)
downloadgcc-2a502f9e4c5c6a8e908ef1b0b5c03fb2e4bd4390.zip
gcc-2a502f9e4c5c6a8e908ef1b0b5c03fb2e4bd4390.tar.gz
gcc-2a502f9e4c5c6a8e908ef1b0b5c03fb2e4bd4390.tar.bz2
arm: remove some redundant zero_extend ops on thumb1
The code in gcc.target/unsigned-extend-1.c really should not need an unsigned extension operations when the optimizers are used. For Arm and thumb2 that is indeed the case, but for thumb1 code it gets more complicated as there are too many instructions for combine to look at. For thumb1 we end up with two redundant zero_extend patterns which are not removed: the first after the subtract instruction and the second of the final boolean result. We can partially fix this (for the second case above) by adding a new split pattern for LEU and GEU patterns which work because the two instructions for the [LG]EU pattern plus the redundant extension instruction are combined into a single insn, which we can then split using the 3->2 method back into the two insns of the [LG]EU sequence. Because we're missing the optimization for all thumb1 cases (not just those architectures with UXTB), I've adjust the testcase to detect all the idioms that we might use for zero-extending a value, namely: UXTB AND ...#255 (in thumb1 this would require a register to hold 255) LSL ... #24; LSR ... #24 but I've also marked this test as XFAIL for thumb1 because we can't yet eliminate the first of the two extend instructions. gcc/ * config/arm/thumb1.md (split patterns for GEU and LEU): New. gcc/testsuite: * gcc.target/arm/unsigned-extend-1.c: Expand check for any insn suggesting a zero-extend. XFAIL for thumb1 code.
Diffstat (limited to 'gcc/fortran/constructor.h')
0 files changed, 0 insertions, 0 deletions