diff options
author | Christoph Müllner <christoph.muellner@vrull.eu> | 2023-09-08 07:45:24 +0200 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@vrull.eu> | 2023-09-08 14:21:51 +0200 |
commit | d8bdc978dc9cd4a6210997edacedb954375af70d (patch) | |
tree | 6e484dd7078909b1d9bd43608efdedcd52c496ad /gcc/tree-ssa-phiopt.cc | |
parent | 0e25761b373f075a41d43b9462366a653dbf1121 (diff) | |
download | gcc-d8bdc978dc9cd4a6210997edacedb954375af70d.zip gcc-d8bdc978dc9cd4a6210997edacedb954375af70d.tar.gz gcc-d8bdc978dc9cd4a6210997edacedb954375af70d.tar.bz2 |
riscv: xtheadbb: Fix extendqi<SUPERQI> insn
Recently three SPEC CPU 2017 benchmarks broke when using xtheadbb:
* 500.perlbench_r
* 525.x264_r
* 557.xz_r
Tracing the issue down revealed, that we emit a 'th.ext xN,xN,15,0'
for a extendqi<SUPERQI> insn, which is obviously wrong.
This patch splits the common 'extend<SHORT:mode><SUPERQI:mode>2_th_ext'
insn into two 'extendqi<SUPERQI>' and 'extendhi<SUPERQI>' insns,
which emit the right extension instruction.
Additionally, this patch adds test cases for these insns.
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
gcc/ChangeLog:
* config/riscv/thead.md (*extend<SHORT:mode><SUPERQI:mode>2_th_ext):
Remove broken INSN.
(*extendhi<SUPERQI:mode>2_th_ext): New INSN.
(*extendqi<SUPERQI:mode>2_th_ext): New INSN.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/xtheadbb-ext-2.c: New test.
* gcc.target/riscv/xtheadbb-ext-3.c: New test.
Diffstat (limited to 'gcc/tree-ssa-phiopt.cc')
0 files changed, 0 insertions, 0 deletions