i386.md (fix_trunc<mode>_i387_fisttp_with_temp): Use 'X' constraint for operand 2 when operand 0 is memory operand.

* config/i386/i386.md (fix_trunc<mode>_i387_fisttp_with_temp): Use 'X'
        constraint for operand 2 when operand 0 is memory operand.
        (fix_truncdi_i387_with_temp): : Use 'X' constraint for operand 4 when
        operand 0 is memory operand.
        (fix_trunc<mode>_i387_with_temp): Ditto.
        (*floatsi<mode>2_vector_mixed_with_temp): Use 'X' constraint for
        operand 2 when operand 1 is memory operand.
        (*float<SSEMODEI24:mode><MODEF:mode>2_mixed_with_temp): Ditto.
        (*floatsi<mode>2_vector_sse_with_temp): Ditto.
        (*float<SSEMODEI24:mode><MODEF:mode>2_sse_with_temp): Ditto.
        (*float<SSEMODEI24:mode><X87MODEF:mode>2_i387_with_temp): Ditto.
        (floatdi<X87MODEF:mode>2_i387_with_xmm): Use 'X' constraint for
        operands 2,3 and 4 when operand 1 is memory operand.
        (fistdi2_with_temp): Use 'X' constraint for operand 2 when operand 0
        is memory operand.
        (fistdi2_floor_with_temp): Ditto.
        (fist<mode>2_floor_with_temp): Ditto.
        (fistdi2_ceil_with_temp): Ditto.
        (fist<mode>2_ceil_with_temp): Ditto.
        (*truncdfsf_fast_mixed): Merge alternatives 0 and 1.

From-SVN: r134697
This commit is contained in:
Uros Bizjak 2008-04-26 15:43:13 +02:00 committed by Uros Bizjak
parent da69cc9160
commit 73e8165a68
2 changed files with 43 additions and 21 deletions

View File

@ -1,3 +1,26 @@
2008-04-26 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (fix_trunc<mode>_i387_fisttp_with_temp): Use 'X'
constraint for operand 2 when operand 0 is memory operand.
(fix_truncdi_i387_with_temp): : Use 'X' constraint for operand 4 when
operand 0 is memory operand.
(fix_trunc<mode>_i387_with_temp): Ditto.
(*floatsi<mode>2_vector_mixed_with_temp): Use 'X' constraint for
operand 2 when operand 1 is memory operand.
(*float<SSEMODEI24:mode><MODEF:mode>2_mixed_with_temp): Ditto.
(*floatsi<mode>2_vector_sse_with_temp): Ditto.
(*float<SSEMODEI24:mode><MODEF:mode>2_sse_with_temp): Ditto.
(*float<SSEMODEI24:mode><X87MODEF:mode>2_i387_with_temp): Ditto.
(floatdi<X87MODEF:mode>2_i387_with_xmm): Use 'X' constraint for
operands 2,3 and 4 when operand 1 is memory operand.
(fistdi2_with_temp): Use 'X' constraint for operand 2 when operand 0
is memory operand.
(fistdi2_floor_with_temp): Ditto.
(fist<mode>2_floor_with_temp): Ditto.
(fistdi2_ceil_with_temp): Ditto.
(fist<mode>2_ceil_with_temp): Ditto.
(*truncdfsf_fast_mixed): Merge alternatives 0 and 1.
2008-04-26 David Daney <ddaney@avtrex.com>
* config/mips/mips.md (UNSPEC_COMPARE_AND_SWAP_12): New

View File

@ -4206,23 +4206,22 @@
"")
(define_insn "*truncdfsf_fast_mixed"
[(set (match_operand:SF 0 "nonimmediate_operand" "=m,f,x")
[(set (match_operand:SF 0 "nonimmediate_operand" "=fm,x")
(float_truncate:SF
(match_operand:DF 1 "nonimmediate_operand" "f ,f,xm")))]
(match_operand:DF 1 "nonimmediate_operand" "f ,xm")))]
"TARGET_SSE2 && TARGET_MIX_SSE_I387 && flag_unsafe_math_optimizations"
{
switch (which_alternative)
{
case 0:
case 1:
return output_387_reg_move (insn, operands);
case 2:
case 1:
return "cvtsd2ss\t{%1, %0|%0, %1}";
default:
gcc_unreachable ();
}
}
[(set_attr "type" "fmov,fmov,ssecvt")
[(set_attr "type" "fmov,ssecvt")
(set_attr "mode" "SF")])
;; Yes, this one doesn't depend on flag_unsafe_math_optimizations,
@ -4640,7 +4639,7 @@
(define_insn "fix_trunc<mode>_i387_fisttp_with_temp"
[(set (match_operand:X87MODEI 0 "nonimmediate_operand" "=m,?r")
(fix:X87MODEI (match_operand 1 "register_operand" "f,f")))
(clobber (match_operand:X87MODEI 2 "memory_operand" "=m,m"))
(clobber (match_operand:X87MODEI 2 "memory_operand" "=X,m"))
(clobber (match_scratch:XF 3 "=&1f,&1f"))]
"X87_FLOAT_MODE_P (GET_MODE (operands[1]))
&& TARGET_FISTTP
@ -4729,7 +4728,7 @@
(fix:DI (match_operand 1 "register_operand" "f,f")))
(use (match_operand:HI 2 "memory_operand" "m,m"))
(use (match_operand:HI 3 "memory_operand" "m,m"))
(clobber (match_operand:DI 4 "memory_operand" "=m,m"))
(clobber (match_operand:DI 4 "memory_operand" "=X,m"))
(clobber (match_scratch:XF 5 "=&1f,&1f"))]
"X87_FLOAT_MODE_P (GET_MODE (operands[1]))
&& !TARGET_FISTTP
@ -4786,7 +4785,7 @@
(fix:X87MODEI12 (match_operand 1 "register_operand" "f,f")))
(use (match_operand:HI 2 "memory_operand" "m,m"))
(use (match_operand:HI 3 "memory_operand" "m,m"))
(clobber (match_operand:X87MODEI12 4 "memory_operand" "=m,m"))]
(clobber (match_operand:X87MODEI12 4 "memory_operand" "=X,m"))]
"X87_FLOAT_MODE_P (GET_MODE (operands[1]))
&& !TARGET_FISTTP
&& !SSE_FLOAT_MODE_P (GET_MODE (operands[1]))"
@ -4963,7 +4962,7 @@
[(set (match_operand:MODEF 0 "register_operand" "=f,f,x,x,x")
(float:MODEF
(match_operand:SI 1 "nonimmediate_operand" "m,?r,r,m,!x")))
(clobber (match_operand:SI 2 "memory_operand" "=m,m,m,m,m"))]
(clobber (match_operand:SI 2 "memory_operand" "=X,m,m,X,m"))]
"TARGET_SSE2 && TARGET_MIX_SSE_I387
&& TARGET_USE_VECTOR_CONVERTS && !optimize_size"
"#"
@ -4993,7 +4992,7 @@
[(set (match_operand:MODEF 0 "register_operand" "=f,f,x,x")
(float:MODEF
(match_operand:SSEMODEI24 1 "nonimmediate_operand" "m,?r,r,m")))
(clobber (match_operand:SSEMODEI24 2 "memory_operand" "=m,m,m,m"))]
(clobber (match_operand:SSEMODEI24 2 "memory_operand" "=X,m,m,X"))]
"(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT)
&& SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_MIX_SSE_I387"
"#"
@ -5071,7 +5070,7 @@
[(set (match_operand:MODEF 0 "register_operand" "=x,x,x")
(float:MODEF
(match_operand:SI 1 "nonimmediate_operand" "r,m,!x")))
(clobber (match_operand:SI 2 "memory_operand" "=m,m,m"))]
(clobber (match_operand:SI 2 "memory_operand" "=m,X,m"))]
"TARGET_SSE2 && TARGET_SSE_MATH
&& TARGET_USE_VECTOR_CONVERTS && !optimize_size"
"#"
@ -5215,7 +5214,7 @@
[(set (match_operand:MODEF 0 "register_operand" "=x,x")
(float:MODEF
(match_operand:SSEMODEI24 1 "nonimmediate_operand" "r,m")))
(clobber (match_operand:SSEMODEI24 2 "memory_operand" "=m,m"))]
(clobber (match_operand:SSEMODEI24 2 "memory_operand" "=m,X"))]
"(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT)
&& SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH"
"#"
@ -5301,7 +5300,7 @@
[(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
(float:X87MODEF
(match_operand:SSEMODEI24 1 "nonimmediate_operand" "m,?r")))
(clobber (match_operand:SSEMODEI24 2 "memory_operand" "=m,m"))]
(clobber (match_operand:SSEMODEI24 2 "memory_operand" "=X,m"))]
"TARGET_80387"
"@
fild%z1\t%1
@ -5349,9 +5348,9 @@
[(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
(float:X87MODEF
(match_operand:DI 1 "nonimmediate_operand" "m,?r")))
(clobber (match_scratch:V4SI 3 "=&x,x"))
(clobber (match_scratch:V4SI 4 "=&x,x"))
(clobber (match_operand:DI 2 "memory_operand" "=m,m"))]
(clobber (match_scratch:V4SI 3 "=X,x"))
(clobber (match_scratch:V4SI 4 "=X,x"))
(clobber (match_operand:DI 2 "memory_operand" "=X,m"))]
"TARGET_80387 && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES
&& !TARGET_64BIT && !optimize_size"
"#"
@ -17530,7 +17529,7 @@
[(set (match_operand:DI 0 "nonimmediate_operand" "=m,?r")
(unspec:DI [(match_operand:XF 1 "register_operand" "f,f")]
UNSPEC_FIST))
(clobber (match_operand:DI 2 "memory_operand" "=m,m"))
(clobber (match_operand:DI 2 "memory_operand" "=X,m"))
(clobber (match_scratch:XF 3 "=&1f,&1f"))]
"TARGET_USE_FANCY_MATH_387"
"#"
@ -17780,7 +17779,7 @@
UNSPEC_FIST_FLOOR))
(use (match_operand:HI 2 "memory_operand" "m,m"))
(use (match_operand:HI 3 "memory_operand" "m,m"))
(clobber (match_operand:DI 4 "memory_operand" "=m,m"))
(clobber (match_operand:DI 4 "memory_operand" "=X,m"))
(clobber (match_scratch:XF 5 "=&1f,&1f"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
@ -17839,7 +17838,7 @@
UNSPEC_FIST_FLOOR))
(use (match_operand:HI 2 "memory_operand" "m,m"))
(use (match_operand:HI 3 "memory_operand" "m,m"))
(clobber (match_operand:X87MODEI12 4 "memory_operand" "=m,m"))]
(clobber (match_operand:X87MODEI12 4 "memory_operand" "=X,m"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"#"
@ -18045,7 +18044,7 @@
UNSPEC_FIST_CEIL))
(use (match_operand:HI 2 "memory_operand" "m,m"))
(use (match_operand:HI 3 "memory_operand" "m,m"))
(clobber (match_operand:DI 4 "memory_operand" "=m,m"))
(clobber (match_operand:DI 4 "memory_operand" "=X,m"))
(clobber (match_scratch:XF 5 "=&1f,&1f"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
@ -18104,7 +18103,7 @@
UNSPEC_FIST_CEIL))
(use (match_operand:HI 2 "memory_operand" "m,m"))
(use (match_operand:HI 3 "memory_operand" "m,m"))
(clobber (match_operand:X87MODEI12 4 "memory_operand" "=m,m"))]
(clobber (match_operand:X87MODEI12 4 "memory_operand" "=X,m"))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
"#"