aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-switch-conversion.c
diff options
context:
space:
mode:
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>2020-09-18 09:10:19 +0200
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>2020-09-22 13:55:42 +0200
commit1a84651d164e9ebf080e0b64f0ad300eaae46297 (patch)
treeadca2864fc047adf2fc0d9d8111b733c10db6c62 /gcc/tree-switch-conversion.c
parentc0e9cee285e47f806227b22812b15ffea677d578 (diff)
downloadgcc-1a84651d164e9ebf080e0b64f0ad300eaae46297.zip
gcc-1a84651d164e9ebf080e0b64f0ad300eaae46297.tar.gz
gcc-1a84651d164e9ebf080e0b64f0ad300eaae46297.tar.bz2
IBM Z: Try to make use of load-and-test instructions
This patch enables a peephole2 optimization which transforms a load of constant zero into a temporary register which is then finally used to compare against a floating-point register of interest into a single load and test instruction. However, the optimization is only applied if both registers are dead afterwards and if we test for (in)equality only. This is relaxed in case of fast math. This is a follow up to PR88856. gcc/ChangeLog: * config/s390/s390.md ("*cmp<mode>_ccs_0", "*cmp<mode>_ccz_0", "*cmp<mode>_ccs_0_fastmath"): Basically change "*cmp<mode>_ccs_0" into "*cmp<mode>_ccz_0" and for fast math add "*cmp<mode>_ccs_0_fastmath". gcc/testsuite/ChangeLog: * gcc.target/s390/load-and-test-fp-1.c: Change test to include all possible combinations of dead/live registers and comparisons (equality, relational). * gcc.target/s390/load-and-test-fp-2.c: Same as load-and-test-fp-1.c but for fast math. * gcc.target/s390/load-and-test-fp.h: New test included by load-and-test-fp-{1,2}.c.
Diffstat (limited to 'gcc/tree-switch-conversion.c')
0 files changed, 0 insertions, 0 deletions