[gcc r15-1234] Fix ICE due to REGNO of a SUBREG.
hongtao Liu
liuhongt@gcc.gnu.org
Thu Jun 13 04:55:12 GMT 2024
https://gcc.gnu.org/g:f8bf80a4e1682b2238baad8c44939682f96b1fe0
commit r15-1234-gf8bf80a4e1682b2238baad8c44939682f96b1fe0
Author: liuhongt <hongtao.liu@intel.com>
Date: Thu Jun 13 09:53:58 2024 +0800
Fix ICE due to REGNO of a SUBREG.
Use reg_or_subregno instead.
gcc/ChangeLog:
PR target/115452
* config/i386/i386-features.cc (scalar_chain::convert_op): Use
reg_or_subregno instead of REGNO to avoid ICE.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr115452.c: New test.
Diff:
---
gcc/config/i386/i386-features.cc | 2 +-
gcc/testsuite/gcc.target/i386/pr115452.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/config/i386/i386-features.cc b/gcc/config/i386/i386-features.cc
index e3e004d55267..607d19914606 100644
--- a/gcc/config/i386/i386-features.cc
+++ b/gcc/config/i386/i386-features.cc
@@ -1054,7 +1054,7 @@ scalar_chain::convert_op (rtx *op, rtx_insn *insn)
if (dump_file)
fprintf (dump_file, " Preloading operand for insn %d into r%d\n",
- INSN_UID (insn), REGNO (tmp));
+ INSN_UID (insn), reg_or_subregno (tmp));
}
else if (REG_P (*op))
*op = gen_rtx_SUBREG (vmode, *op, 0);
diff --git a/gcc/testsuite/gcc.target/i386/pr115452.c b/gcc/testsuite/gcc.target/i386/pr115452.c
new file mode 100644
index 000000000000..6c7935feb9f8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr115452.c
@@ -0,0 +1,4 @@
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -msse2 -mstv -mno-bmi -mno-stackrealign -fdump-rtl-stv2" } */
+
+#include "pr70322-2.c"
More information about the Gcc-cvs
mailing list