public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2922] Fix ICE.
@ 2021-08-16 9:22 hongtao Liu
0 siblings, 0 replies; only message in thread
From: hongtao Liu @ 2021-08-16 9:22 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:1afcf5705a0becdca96111a6cb67670217c335b3
commit r12-2922-g1afcf5705a0becdca96111a6cb67670217c335b3
Author: liuhongt <hongtao.liu@intel.com>
Date: Mon Aug 16 17:12:21 2021 +0800
Fix ICE.
gcc/ChangeLog:
PR target/101930
* config/i386/i386.md (ldexp<mode>3): Force operands[1] to
reg.
gcc/testsuite/ChangeLog:
PR target/101930
* gcc.target/i386/pr101930.c: New test.
Diff:
---
gcc/config/i386/i386.md | 4 +---
gcc/testsuite/gcc.target/i386/pr101930.c | 9 +++++++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 4a8e8fea290..41d85623ad6 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -17938,9 +17938,7 @@
if (TARGET_AVX512F && TARGET_SSE_MATH)
{
rtx op2 = gen_reg_rtx (<MODE>mode);
-
- if (!nonimmediate_operand (operands[1], <MODE>mode))
- operands[1] = force_reg (<MODE>mode, operands[1]);
+ operands[1] = force_reg (<MODE>mode, operands[1]);
emit_insn (gen_floatsi<mode>2 (op2, operands[2]));
emit_insn (gen_avx512f_scalef<mode>2 (operands[0], operands[1], op2));
diff --git a/gcc/testsuite/gcc.target/i386/pr101930.c b/gcc/testsuite/gcc.target/i386/pr101930.c
new file mode 100644
index 00000000000..7207dd18377
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr101930.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2 -mfpmath=sse -ffast-math" } */
+double a;
+double
+__attribute__((noipa))
+foo (int b)
+{
+ return __builtin_ldexp (a, b);
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-16 9:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 9:22 [gcc r12-2922] Fix ICE hongtao Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).