i386.h (SSE_VEC_FLOAT_MODE_P): New define.
* config/i386/i386.h (SSE_VEC_FLOAT_MODE_P): New define. * config/i386/i386.md (*sse_setcc<mode>): Macroize from *sse_setccsf and *sse_setccdf using MODEF mode iterator and SSE_FLOAT_MODE_P as insn constraint. (smin<mode>3): Ditto from similar patterns. (smax<mode>3): Ditto. (*ieee_smin<mode>3): Ditto. (*ieee_smax<mode>3): Ditto. * config/i386/sse.md (sse): New mode attribute. (mov<mode>): Macroize expander from movv4sf and movv2df using SSEMODEF2P mode iterator. (<sse>_movnt<mode>): Ditto from similar patterns. Use SSE_VEC_FLOAT_MODE_P as insn constraint. (storent<mode>): Ditto. (storent<mode>): Macroize expander from storentsf and storentdf using MODEF mode iterator. (neg<mode>2): Macroize from negv4sf2 and negv2df2 using SSEMODEF2P mode iterator and SSE_VEC_FLOAT_MODE_P as insn constraint. (abs<mode>2): Ditto from similar patterns. (add<mode>3, *add<mode>3, <sse>_vmadd<mode>3): Ditto. (sub<mode>3, *sub<mode>3, <sse>_vmsub<mode>3): Ditto. (<sse>_div<mode>3, <sse>_vmdiv<mode>3): Ditto. (<sse>_vmsqrt<mode>2): Ditto. (smin<mode>3, *smin<mode>3_finite, *smin<mode>3) (<sse>_vmsmin<mode>3, *ieee_smin<mode>3): Ditto. (smax<mode>3, *smax<mode>3_finite, *smax<mode>3) (<sse>_vmsmax<mode>3, *ieee_smax<mode>3): Ditto. (<sse>_maskcmp<mode>3): Macroize from sse_maskcmpv4sf3, sse_maskcmpsf3, sse2_maskcmpv2df3 and sse2_maskcmpdf3 using SSEMODEF4 mode iterator. Use SSE_FLOAT_MODE_P with SSE_VEC_FLOAT_MODE_P as insn constraint. (<sse>_comi): Macroize from sse_comi and sse2_comi using MODEF mode iterator and SSE_FLOAT_MODE_P as insn constraint. (<sse>_ucomi): Ditto from similar patterns. (<sse>_vmmaskcmp<mode>3): Macroize from sse_vmmaskcmpv4sf3 and sse2_vmmaskcmpv2df3 using SSEMODEF2P mode iterator and SSE_VEC_FLOAT_MODE_P as insn constraint. (vcond<mode>): Ditto from similar patterns. (and<mode>3, *and<mode>3): Ditto. (<sse>_nand<mode>3): Ditto. (ior<mode>3, *ior<mode>3): Ditto. (xor<mode>3, *xor<mode>3): Ditto. (*and<mode>3): Macroize from *andsf3 and *anddf3 using MODEF mode iterator and SSE_FLOAT_MODE_P as insn constraint. (*nand<mode>3): Ditto from similar patterns. (*ior<mode>3): Ditto. (*xor<mode>3): Ditto. From-SVN: r132478
This commit is contained in:
parent
57a65098f6
commit
d6023b50b7
@ -1,3 +1,53 @@
|
||||
2008-02-20 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* config/i386/i386.h (SSE_VEC_FLOAT_MODE_P): New define.
|
||||
* config/i386/i386.md (*sse_setcc<mode>): Macroize from *sse_setccsf
|
||||
and *sse_setccdf using MODEF mode iterator and SSE_FLOAT_MODE_P as
|
||||
insn constraint.
|
||||
(smin<mode>3): Ditto from similar patterns.
|
||||
(smax<mode>3): Ditto.
|
||||
(*ieee_smin<mode>3): Ditto.
|
||||
(*ieee_smax<mode>3): Ditto.
|
||||
* config/i386/sse.md (sse): New mode attribute.
|
||||
(mov<mode>): Macroize expander from movv4sf and movv2df using
|
||||
SSEMODEF2P mode iterator.
|
||||
(<sse>_movnt<mode>): Ditto from similar patterns. Use
|
||||
SSE_VEC_FLOAT_MODE_P as insn constraint.
|
||||
(storent<mode>): Ditto.
|
||||
(storent<mode>): Macroize expander from storentsf and storentdf using
|
||||
MODEF mode iterator.
|
||||
(neg<mode>2): Macroize from negv4sf2 and negv2df2 using SSEMODEF2P
|
||||
mode iterator and SSE_VEC_FLOAT_MODE_P as insn constraint.
|
||||
(abs<mode>2): Ditto from similar patterns.
|
||||
(add<mode>3, *add<mode>3, <sse>_vmadd<mode>3): Ditto.
|
||||
(sub<mode>3, *sub<mode>3, <sse>_vmsub<mode>3): Ditto.
|
||||
(<sse>_div<mode>3, <sse>_vmdiv<mode>3): Ditto.
|
||||
(<sse>_vmsqrt<mode>2): Ditto.
|
||||
(smin<mode>3, *smin<mode>3_finite, *smin<mode>3)
|
||||
(<sse>_vmsmin<mode>3, *ieee_smin<mode>3): Ditto.
|
||||
(smax<mode>3, *smax<mode>3_finite, *smax<mode>3)
|
||||
(<sse>_vmsmax<mode>3, *ieee_smax<mode>3): Ditto.
|
||||
(<sse>_maskcmp<mode>3): Macroize from sse_maskcmpv4sf3,
|
||||
sse_maskcmpsf3, sse2_maskcmpv2df3 and sse2_maskcmpdf3 using SSEMODEF4
|
||||
mode iterator. Use SSE_FLOAT_MODE_P with SSE_VEC_FLOAT_MODE_P as
|
||||
insn constraint.
|
||||
(<sse>_comi): Macroize from sse_comi and sse2_comi using MODEF mode
|
||||
iterator and SSE_FLOAT_MODE_P as insn constraint.
|
||||
(<sse>_ucomi): Ditto from similar patterns.
|
||||
(<sse>_vmmaskcmp<mode>3): Macroize from sse_vmmaskcmpv4sf3 and
|
||||
sse2_vmmaskcmpv2df3 using SSEMODEF2P mode iterator and
|
||||
SSE_VEC_FLOAT_MODE_P as insn constraint.
|
||||
(vcond<mode>): Ditto from similar patterns.
|
||||
(and<mode>3, *and<mode>3): Ditto.
|
||||
(<sse>_nand<mode>3): Ditto.
|
||||
(ior<mode>3, *ior<mode>3): Ditto.
|
||||
(xor<mode>3, *xor<mode>3): Ditto.
|
||||
(*and<mode>3): Macroize from *andsf3 and *anddf3 using MODEF mode
|
||||
iterator and SSE_FLOAT_MODE_P as insn constraint.
|
||||
(*nand<mode>3): Ditto from similar patterns.
|
||||
(*ior<mode>3): Ditto.
|
||||
(*xor<mode>3): Ditto.
|
||||
|
||||
2008-02-20 Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
* config/spu/spu.md (vec_unpacku_hi_v8hi, vec_unpacku_lo_v8hi,
|
||||
|
@ -1454,6 +1454,9 @@ enum reg_class
|
||||
#define SSE_FLOAT_MODE_P(MODE) \
|
||||
((TARGET_SSE && (MODE) == SFmode) || (TARGET_SSE2 && (MODE) == DFmode))
|
||||
|
||||
#define SSE_VEC_FLOAT_MODE_P(MODE) \
|
||||
((TARGET_SSE && (MODE) == V4SFmode) || (TARGET_SSE2 && (MODE) == V2DFmode))
|
||||
|
||||
#define MMX_REG_P(XOP) (REG_P (XOP) && MMX_REGNO_P (REGNO (XOP)))
|
||||
#define MMX_REGNO_P(N) IN_RANGE ((N), FIRST_MMX_REG, LAST_MMX_REG)
|
||||
|
||||
|
@ -13964,25 +13964,15 @@
|
||||
;; 0xffffffff is NaN, but not in normalized form, so we can't represent
|
||||
;; it directly.
|
||||
|
||||
(define_insn "*sse_setccsf"
|
||||
[(set (match_operand:SF 0 "register_operand" "=x")
|
||||
(match_operator:SF 1 "sse_comparison_operator"
|
||||
[(match_operand:SF 2 "register_operand" "0")
|
||||
(match_operand:SF 3 "nonimmediate_operand" "xm")]))]
|
||||
"TARGET_SSE && !TARGET_SSE5"
|
||||
"cmp%D1ss\t{%3, %0|%0, %3}"
|
||||
(define_insn "*sse_setcc<mode>"
|
||||
[(set (match_operand:MODEF 0 "register_operand" "=x")
|
||||
(match_operator:MODEF 1 "sse_comparison_operator"
|
||||
[(match_operand:MODEF 2 "register_operand" "0")
|
||||
(match_operand:MODEF 3 "nonimmediate_operand" "xm")]))]
|
||||
"SSE_FLOAT_MODE_P (<MODE>mode) && !TARGET_SSE5"
|
||||
"cmp%D1s<ssemodefsuffix>\t{%3, %0|%0, %3}"
|
||||
[(set_attr "type" "ssecmp")
|
||||
(set_attr "mode" "SF")])
|
||||
|
||||
(define_insn "*sse_setccdf"
|
||||
[(set (match_operand:DF 0 "register_operand" "=x")
|
||||
(match_operator:DF 1 "sse_comparison_operator"
|
||||
[(match_operand:DF 2 "register_operand" "0")
|
||||
(match_operand:DF 3 "nonimmediate_operand" "xm")]))]
|
||||
"TARGET_SSE2 && !TARGET_SSE5"
|
||||
"cmp%D1sd\t{%3, %0|%0, %3}"
|
||||
[(set_attr "type" "ssecmp")
|
||||
(set_attr "mode" "DF")])
|
||||
(set_attr "mode" "<MODE>")])
|
||||
|
||||
(define_insn "*sse5_setcc<mode>"
|
||||
[(set (match_operand:MODEF 0 "register_operand" "=x")
|
||||
@ -19663,41 +19653,25 @@
|
||||
;; Since both the tree-level MAX_EXPR and the rtl-level SMAX operator
|
||||
;; are undefined in this condition, we're certain this is correct.
|
||||
|
||||
(define_insn "sminsf3"
|
||||
[(set (match_operand:SF 0 "register_operand" "=x")
|
||||
(smin:SF (match_operand:SF 1 "nonimmediate_operand" "%0")
|
||||
(match_operand:SF 2 "nonimmediate_operand" "xm")))]
|
||||
"TARGET_SSE_MATH"
|
||||
"minss\t{%2, %0|%0, %2}"
|
||||
(define_insn "smin<mode>3"
|
||||
[(set (match_operand:MODEF 0 "register_operand" "=x")
|
||||
(smin:MODEF
|
||||
(match_operand:MODEF 1 "nonimmediate_operand" "%0")
|
||||
(match_operand:MODEF 2 "nonimmediate_operand" "xm")))]
|
||||
"SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH"
|
||||
"mins<ssemodefsuffix>\t{%2, %0|%0, %2}"
|
||||
[(set_attr "type" "sseadd")
|
||||
(set_attr "mode" "SF")])
|
||||
(set_attr "mode" "<MODE>")])
|
||||
|
||||
(define_insn "smaxsf3"
|
||||
[(set (match_operand:SF 0 "register_operand" "=x")
|
||||
(smax:SF (match_operand:SF 1 "nonimmediate_operand" "%0")
|
||||
(match_operand:SF 2 "nonimmediate_operand" "xm")))]
|
||||
"TARGET_SSE_MATH"
|
||||
"maxss\t{%2, %0|%0, %2}"
|
||||
(define_insn "smax<mode>3"
|
||||
[(set (match_operand:MODEF 0 "register_operand" "=x")
|
||||
(smax:MODEF
|
||||
(match_operand:MODEF 1 "nonimmediate_operand" "%0")
|
||||
(match_operand:MODEF 2 "nonimmediate_operand" "xm")))]
|
||||
"SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH"
|
||||
"maxs<ssemodefsuffix>\t{%2, %0|%0, %2}"
|
||||
[(set_attr "type" "sseadd")
|
||||
(set_attr "mode" "SF")])
|
||||
|
||||
(define_insn "smindf3"
|
||||
[(set (match_operand:DF 0 "register_operand" "=x")
|
||||
(smin:DF (match_operand:DF 1 "nonimmediate_operand" "%0")
|
||||
(match_operand:DF 2 "nonimmediate_operand" "xm")))]
|
||||
"TARGET_SSE2 && TARGET_SSE_MATH"
|
||||
"minsd\t{%2, %0|%0, %2}"
|
||||
[(set_attr "type" "sseadd")
|
||||
(set_attr "mode" "DF")])
|
||||
|
||||
(define_insn "smaxdf3"
|
||||
[(set (match_operand:DF 0 "register_operand" "=x")
|
||||
(smax:DF (match_operand:DF 1 "nonimmediate_operand" "%0")
|
||||
(match_operand:DF 2 "nonimmediate_operand" "xm")))]
|
||||
"TARGET_SSE2 && TARGET_SSE_MATH"
|
||||
"maxsd\t{%2, %0|%0, %2}"
|
||||
[(set_attr "type" "sseadd")
|
||||
(set_attr "mode" "DF")])
|
||||
(set_attr "mode" "<MODE>")])
|
||||
|
||||
;; These versions of the min/max patterns implement exactly the operations
|
||||
;; min = (op1 < op2 ? op1 : op2)
|
||||
@ -19705,45 +19679,27 @@
|
||||
;; Their operands are not commutative, and thus they may be used in the
|
||||
;; presence of -0.0 and NaN.
|
||||
|
||||
(define_insn "*ieee_sminsf3"
|
||||
[(set (match_operand:SF 0 "register_operand" "=x")
|
||||
(unspec:SF [(match_operand:SF 1 "register_operand" "0")
|
||||
(match_operand:SF 2 "nonimmediate_operand" "xm")]
|
||||
UNSPEC_IEEE_MIN))]
|
||||
"TARGET_SSE_MATH"
|
||||
"minss\t{%2, %0|%0, %2}"
|
||||
(define_insn "*ieee_smin<mode>3"
|
||||
[(set (match_operand:MODEF 0 "register_operand" "=x")
|
||||
(unspec:MODEF
|
||||
[(match_operand:MODEF 1 "register_operand" "0")
|
||||
(match_operand:MODEF 2 "nonimmediate_operand" "xm")]
|
||||
UNSPEC_IEEE_MIN))]
|
||||
"SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH"
|
||||
"mins<ssemodefsuffix>\t{%2, %0|%0, %2}"
|
||||
[(set_attr "type" "sseadd")
|
||||
(set_attr "mode" "SF")])
|
||||
(set_attr "mode" "<MODE>")])
|
||||
|
||||
(define_insn "*ieee_smaxsf3"
|
||||
[(set (match_operand:SF 0 "register_operand" "=x")
|
||||
(unspec:SF [(match_operand:SF 1 "register_operand" "0")
|
||||
(match_operand:SF 2 "nonimmediate_operand" "xm")]
|
||||
UNSPEC_IEEE_MAX))]
|
||||
"TARGET_SSE_MATH"
|
||||
"maxss\t{%2, %0|%0, %2}"
|
||||
(define_insn "*ieee_smax<mode>3"
|
||||
[(set (match_operand:MODEF 0 "register_operand" "=x")
|
||||
(unspec:MODEF
|
||||
[(match_operand:MODEF 1 "register_operand" "0")
|
||||
(match_operand:MODEF 2 "nonimmediate_operand" "xm")]
|
||||
UNSPEC_IEEE_MAX))]
|
||||
"SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH"
|
||||
"maxs<ssemodefsuffix>\t{%2, %0|%0, %2}"
|
||||
[(set_attr "type" "sseadd")
|
||||
(set_attr "mode" "SF")])
|
||||
|
||||
(define_insn "*ieee_smindf3"
|
||||
[(set (match_operand:DF 0 "register_operand" "=x")
|
||||
(unspec:DF [(match_operand:DF 1 "register_operand" "0")
|
||||
(match_operand:DF 2 "nonimmediate_operand" "xm")]
|
||||
UNSPEC_IEEE_MIN))]
|
||||
"TARGET_SSE2 && TARGET_SSE_MATH"
|
||||
"minsd\t{%2, %0|%0, %2}"
|
||||
[(set_attr "type" "sseadd")
|
||||
(set_attr "mode" "DF")])
|
||||
|
||||
(define_insn "*ieee_smaxdf3"
|
||||
[(set (match_operand:DF 0 "register_operand" "=x")
|
||||
(unspec:DF [(match_operand:DF 1 "register_operand" "0")
|
||||
(match_operand:DF 2 "nonimmediate_operand" "xm")]
|
||||
UNSPEC_IEEE_MAX))]
|
||||
"TARGET_SSE2 && TARGET_SSE_MATH"
|
||||
"maxsd\t{%2, %0|%0, %2}"
|
||||
[(set_attr "type" "sseadd")
|
||||
(set_attr "mode" "DF")])
|
||||
(set_attr "mode" "<MODE>")])
|
||||
|
||||
;; Make two stack loads independent:
|
||||
;; fld aa fld aa
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user