PR target/79593
* config/i386/i386.md (standard_x87sse_constant_load splitter):
Use nonimmediate_operand instead of memory_operand for operand 1.
(float-extend standard_x87sse_constant_load splitter): Ditto.
testsuite/ChangeLog:
PR target/79593
* gcc.target/i386/pr79593.c: New test.
From-SVN: r245640
(define_split
[(set (match_operand 0 "any_fp_register_operand")
- (match_operand 1 "memory_operand"))]
+ (match_operand 1 "nonimmediate_operand"))]
"reload_completed
&& (GET_MODE (operands[0]) == TFmode
|| GET_MODE (operands[0]) == XFmode
(define_split
[(set (match_operand 0 "any_fp_register_operand")
- (float_extend (match_operand 1 "memory_operand")))]
+ (float_extend (match_operand 1 "nonimmediate_operand")))]
"reload_completed
&& (GET_MODE (operands[0]) == TFmode
|| GET_MODE (operands[0]) == XFmode
--- /dev/null
+/* PR target/79593 */
+/* { dg-do compile } */
+/* { dg-options "-Ofast -mfpmath=387" } */
+
+extern float global_data[1024];
+
+static long double MIN (long double a, long double b) { return a < b ? a : b; }
+static long double MAX (long double a, long double b) { return a > b ? a : b; }
+
+float bar (void)
+{
+ long double delta = (global_data[0]);
+
+ return (MIN (MAX (delta, 0.0l), 1.0l));
+}
+
+/* { dg-final { scan-assembler-not "fld\[ \t\]+%st" } } */