===================================================================
@@ -2116,11 +2116,6 @@ lra (FILE *f)
lra_in_progress = 1;
- /* The enable attributes can change their values as LRA starts
- although it is a bad practice. To prevent reuse of the outdated
- values, clear them. */
- recog_init ();
-
lra_live_range_iter = lra_coalesce_iter = 0;
lra_constraint_iter = lra_constraint_iter_after_spill = 0;
lra_inheritance_iter = lra_undo_inheritance_iter = 0;
===================================================================
@@ -779,6 +779,8 @@ (define_attr "enabled" ""
]
(const_int 1)))
+(define_attr "preferred_for_speed" "" (const_int 1))
+
;; Describe a user's asm statement.
(define_asm_attributes
[(set_attr "length" "128")
@@ -4794,16 +4796,12 @@ (define_insn "*float<SWI48:mode><MODEF:m
(symbol_ref "TARGET_MIX_SSE_I387
&& X87_ENABLE_FLOAT (<MODEF:MODE>mode,
<SWI48:MODE>mode)")
- (eq_attr "alternative" "1")
- /* ??? For sched1 we need constrain_operands to be able to
- select an alternative. Leave this enabled before RA. */
- (symbol_ref "TARGET_INTER_UNIT_CONVERSIONS
- || optimize_function_for_size_p (cfun)
- || !(reload_completed
- || reload_in_progress
- || lra_in_progress)")
]
(symbol_ref "true")))
+ (set (attr "preferred_for_speed")
+ (cond [(eq_attr "alternative" "1")
+ (symbol_ref "TARGET_INTER_UNIT_CONVERSIONS")]
+ (symbol_ref "true")))
])
(define_insn "*float<SWI48x:mode><MODEF:mode>2_i387"
===================================================================
@@ -0,0 +1,35 @@
+/* { dg-options "-O2 -fno-toplevel-reorder -mfpmath=sse" } */
+/* { dg-require-effective-target lp64 } */
+
+void __attribute__ ((hot, target ("tune=bdver2")))
+f1 (int x)
+{
+ register float f asm ("%xmm0") = x;
+ asm volatile ("#f" :: "x" (f));
+}
+
+void __attribute__ ((cold, target ("tune=bdver2")))
+f2 (int x)
+{
+ register float f asm ("%xmm1") = x;
+ asm volatile ("#f" :: "x" (f));
+}
+
+void __attribute__ ((hot, target ("tune=bdver2")))
+f3 (int x)
+{
+ register float f asm ("%xmm2") = x;
+ asm volatile ("#f" :: "x" (f));
+}
+
+void __attribute__ ((cold, target ("tune=bdver2")))
+f4 (int x)
+{
+ register float f asm ("%xmm3") = x;
+ asm volatile ("#f" :: "x" (f));
+}
+
+/* { dg-final { scan-assembler "sp\\\), %xmm0" } } */
+/* { dg-final { scan-assembler "di, %xmm1" } } */
+/* { dg-final { scan-assembler "sp\\\), %xmm2" } } */
+/* { dg-final { scan-assembler "di, %xmm3" } } */