From 23d77b6df4d72037852fc2f36d5982b836b5fb0e Mon Sep 17 00:00:00 2001 From: jakub Date: Wed, 21 Sep 2011 11:39:23 +0000 Subject: [PATCH] * config/i386/sse.md (3 smaxmin:VI124_128 expander): Use nonimmediate_operand instead of register_operand predicate for operands 1 and 2, force them into registers if expanding them as comparison. (3 umaxmin:VI124_128 expander): Similarly. For UMAX V8HImode force into register just operand 1. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179045 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/config/i386/sse.md | 14 ++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 036fdde..fb80dc9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2011-09-21 Jakub Jelinek + + * config/i386/sse.md (3 smaxmin:VI124_128 expander): Use + nonimmediate_operand instead of register_operand predicate for operands + 1 and 2, force them into registers if expanding them as comparison. + (3 umaxmin:VI124_128 expander): Similarly. For UMAX + V8HImode force into register just operand 1. + 2011-09-21 Georg-Johann Lay PR target/45099 diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 5e1701c..7c15e1a 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -5887,8 +5887,8 @@ (define_expand "3" [(set (match_operand:VI124_128 0 "register_operand" "") - (smaxmin:VI124_128 (match_operand:VI124_128 1 "register_operand" "") - (match_operand:VI124_128 2 "register_operand" "")))] + (smaxmin:VI124_128 (match_operand:VI124_128 1 "nonimmediate_operand" "") + (match_operand:VI124_128 2 "nonimmediate_operand" "")))] "TARGET_SSE2" { if (TARGET_SSE4_1 || mode == V8HImode) @@ -5899,6 +5899,8 @@ bool ok; xops[0] = operands[0]; + operands[1] = force_reg (mode, operands[1]); + operands[2] = force_reg (mode, operands[2]); if ( == SMAX) { @@ -5954,8 +5956,8 @@ (define_expand "3" [(set (match_operand:VI124_128 0 "register_operand" "") - (umaxmin:VI124_128 (match_operand:VI124_128 1 "register_operand" "") - (match_operand:VI124_128 2 "register_operand" "")))] + (umaxmin:VI124_128 (match_operand:VI124_128 1 "nonimmediate_operand" "") + (match_operand:VI124_128 2 "nonimmediate_operand" "")))] "TARGET_SSE2" { if (TARGET_SSE4_1 || mode == V16QImode) @@ -5963,6 +5965,7 @@ else if ( == UMAX && mode == V8HImode) { rtx op0 = operands[0], op2 = operands[2], op3 = op0; + operands[1] = force_reg (mode, operands[1]); if (rtx_equal_p (op3, op2)) op3 = gen_reg_rtx (V8HImode); emit_insn (gen_sse2_ussubv8hi3 (op3, operands[1], op2)); @@ -5974,6 +5977,9 @@ rtx xops[6]; bool ok; + operands[1] = force_reg (mode, operands[1]); + operands[2] = force_reg (mode, operands[2]); + xops[0] = operands[0]; if ( == UMAX) -- 2.7.4