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.
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));
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2 -mfpmath=sse -ffast-math" } */
+double a;
+double
+__attribute__((noipa))
+foo (int b)
+{
+ return __builtin_ldexp (a, b);
+}