aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2019-10-18 19:04:46 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2019-10-18 19:04:46 +0000
commita79048f6250febc1acce09d790035276d534e754 (patch)
treef1e52a3111c47fb41bbec05a282a1f88a986cbd6 /gcc/tree.c
parentfa62df0e600ef617bce549d64026c0e5cc817c31 (diff)
downloadgcc-a79048f6250febc1acce09d790035276d534e754.zip
gcc-a79048f6250febc1acce09d790035276d534e754.tar.gz
gcc-a79048f6250febc1acce09d790035276d534e754.tar.bz2
[arm] Improve constant handling for usubvsi4.
This patch improves the expansion of usubvsi4 by allowing suitable constants to be passed directly. Unlike normal subtraction, either operand may be a constant (and indeed I have seen cases where both can be with LTO enabled). One interesting testcase that improves as a result of this is: unsigned f6 (unsigned a) { unsigned x; return __builtin_sub_overflow (5U, a, &x) ? 0 : x; } Which previously compiled to: rsbs r3, r0, #5 cmp r0, #5 movls r0, r3 movhi r0, #0 but now generates the optimal sequence: rsbs r0, r0, #5 movcc r0, #0 * config/arm/arm.md (usubv<mode>4): Delete expansion. (usubvsi4): New pattern. Allow some immediate values for inputs. (usubvdi4): New pattern. From-SVN: r277187
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions