It could cause weired spill in RA when register pressure is high.

Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}.
Ok for trunk?

BTW, It's difficult to get a decent testcase for the issue since the spill
is not exposed in simple testcase.

gcc/ChangeLog:

        PR target/117562
        * config/i386/sse.md (vec_unpacks_hi_v4sf): Initialize
        operands[2] with CONST0_RTX.
---
 gcc/config/i386/sse.md | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 72acd5bde5e..498a42d6e1e 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -10424,7 +10424,10 @@ (define_expand "vec_unpacks_hi_v4sf"
        (match_dup 2)
        (parallel [(const_int 0) (const_int 1)]))))]
   "TARGET_SSE2"
-  "operands[2] = gen_reg_rtx (V4SFmode);")
+{
+  operands[2] = gen_reg_rtx (V4SFmode);
+  emit_move_insn (operands[2], CONST0_RTX (V4SFmode));
+})
 
 (define_expand "vec_unpacks_hi_v8sf"
   [(set (match_dup 2)
-- 
2.34.1

Reply via email to