diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-21 11:39:23 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-21 11:39:23 +0000 |
commit | 23d77b6df4d72037852fc2f36d5982b836b5fb0e (patch) | |
tree | bb83913dceba0a6362df9c2866eb7b71d3fca3df /gcc/config/i386 | |
parent | 52628f41a70704d3ebf04ed5c0656f6114d3847e (diff) | |
download | gcc-23d77b6df4d72037852fc2f36d5982b836b5fb0e.tar.gz |
* config/i386/sse.md (<code><mode>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.
(<code><mode>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
Diffstat (limited to 'gcc/config/i386')
-rw-r--r-- | gcc/config/i386/sse.md | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 5e1701c858b..7c15e1a9a70 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -5887,8 +5887,8 @@ (define_expand "<code><mode>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>mode == V8HImode) @@ -5899,6 +5899,8 @@ bool ok; xops[0] = operands[0]; + operands[1] = force_reg (<MODE>mode, operands[1]); + operands[2] = force_reg (<MODE>mode, operands[2]); if (<CODE> == SMAX) { @@ -5954,8 +5956,8 @@ (define_expand "<code><mode>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>mode == V16QImode) @@ -5963,6 +5965,7 @@ else if (<CODE> == UMAX && <MODE>mode == V8HImode) { rtx op0 = operands[0], op2 = operands[2], op3 = op0; + operands[1] = force_reg (<MODE>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>mode, operands[1]); + operands[2] = force_reg (<MODE>mode, operands[2]); + xops[0] = operands[0]; if (<CODE> == UMAX) |