aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorPat Haugen <pthaugen@linux.ibm.com>2023-09-19 13:19:59 -0500
committerPat Haugen <pthaugen@linux.ibm.com>2023-09-19 13:27:46 -0500
commit58ab38213b979811d314f68e3f455c28a1d44140 (patch)
treec7565087e4cca3f91396680488de882c5d726618 /libcpp
parent81d5ca0b9b8431f1bd7a5ec8a2c94f04bb0cf032 (diff)
downloadgcc-58ab38213b979811d314f68e3f455c28a1d44140.zip
gcc-58ab38213b979811d314f68e3f455c28a1d44140.tar.gz
gcc-58ab38213b979811d314f68e3f455c28a1d44140.tar.bz2
Disable generation of scalar modulo instructions.
It was recently discovered that the scalar modulo instructions can suffer noticeable performance issues for certain input values. This patch disables their generation since the equivalent div/mul/sub sequence does not suffer the same problem. gcc/ * config/rs6000/rs6000.cc (rs6000_rtx_costs): Check whether the modulo instruction is disabled. * config/rs6000/rs6000.h (RS6000_DISABLE_SCALAR_MODULO): New. * config/rs6000/rs6000.md (mod<mode>3, *mod<mode>3): Check it. (define_expand umod<mode>3): New. (define_insn umod<mode>3): Rename to *umod<mode>3 and check if the modulo instruction is disabled. (umodti3, modti3): Check if the modulo instruction is disabled. gcc/testsuite/ * gcc.target/powerpc/clone1.c: Add xfails. * gcc.target/powerpc/clone3.c: Likewise. * gcc.target/powerpc/mod-1.c: Update scan strings and add xfails. * gcc.target/powerpc/mod-2.c: Likewise. * gcc.target/powerpc/p10-vdivq-vmodq.c: Add xfails.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions