aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-11-18 15:29:03 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-11-18 15:29:03 +0000
commitcb77875a86c67f606ff59261348e1d81b945aa44 (patch)
treedc574d98d522088958c22365f79fe15298902192 /gcc/tree.c
parent13c247d6f2a75b7e7a11546e897489716bc31506 (diff)
downloadgcc-cb77875a86c67f606ff59261348e1d81b945aa44.zip
gcc-cb77875a86c67f606ff59261348e1d81b945aa44.tar.gz
gcc-cb77875a86c67f606ff59261348e1d81b945aa44.tar.bz2
Two RTL CC tweaks for SVE pmore/plast conditions
SVE has two composite conditions: pmore == at least one bit set && last bit clear plast == no bits set || last bit set So in general we generate them from: A: CC = test bits B: reg1 = first condition C: CC = test bits D: reg2 = second condition E: result = (reg1 op reg2) where op is || or && To fold all this into a single test, we need to be able to remove the redundant C (the cse.c patch) and then fold B, D and E down to a single condition (the simplify-rtx.c patch). The underlying conditions are unsigned, so the simplify-rtx.c part needs to support both unsigned comparisons and AND. However, to avoid opening the can of worms that is ANDing FP comparisons for unordered inputs, I've restricted the new AND handling to cases in which NaNs can be ignored. I think this is still a strict extension of what we have now, it just doesn't go as far as it could. Going further would need an entirely different set of testcases so I think would make more sense as separate work. 2019-11-18 Richard Sandiford <richard.sandiford@arm.com> gcc/ * cse.c (cse_insn): Delete no-op register moves too. * simplify-rtx.c (comparison_to_mask): Handle unsigned comparisons. Take a second comparison to control the value for NE. (mask_to_comparison): Handle unsigned comparisons. (simplify_logical_relational_operation): Likewise. Update call to comparison_to_mask. Handle AND if !HONOR_NANs. (simplify_binary_operation_1): Call the above for AND too. gcc/testsuite/ * gcc.target/aarch64/sve/acle/asm/ptest_pmore.c: New test. From-SVN: r278411
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions