]> git.ipfire.org Git - thirdparty/gcc.git/commit
[committed][RISC-V][PR target/114139] Verify we have a CONST_INT before extracting...
authorJeff Law <jlaw@ventanamicro.com>
Sun, 23 Jun 2024 14:26:25 +0000 (08:26 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Sun, 23 Jun 2024 14:27:48 +0000 (08:27 -0600)
commitfd536b8412d4dae42aa04739c06f99a915be6261
tree0ecf91219b7ebdc37f500a7422867b4f2a81c2d0
parent2a345214fc332b6f0821edf394ff8802b768db1d
[committed][RISC-V][PR target/114139] Verify we have a CONST_INT before extracting INTVAL

Run-of-the-mill checking issue.  We had something like (plus (reg) (reg)) and
tried to extract INTVAL (XEXP (x, 1)) which of course blows up with checking
on.

Fixed thusly.   Tested on riscv32-elf in my tester.  riscv64-elf is in flight,
but won't finish for a while due to other tasks in flight.

PR target/114139
gcc/
* config/riscv/riscv.cc (riscv_macro_fusion_pair_p): Verify object
is a CONST_INT before looking at INTVAL.

gcc/testsuite/

* gcc.target/riscv/pr114139.c: New test.
gcc/config/riscv/riscv.cc
gcc/testsuite/gcc.target/riscv/pr114139.c [new file with mode: 0644]