predicates.md (x87nonimm_ssenomem_operand): Rename from nonimm_ssenomem_operand.
* config/i386/predicates.md (x87nonimm_ssenomem_operand): Rename from nonimm_ssenomem_operand. (nonimm_ssenomem_operand): New predicate. * config/i386/i386.md (extendsfdf2): Use nonimm_ssenomem_operand as operand 0 predicate. (*extendsfdf2): Merge from *extendsfdf2_mixed and *extendsfdf2_i387. Disable unsupported alternatives using "enabled" attribute. Use register_ssemem_operand as operand 0 predicate. (*fop_<mode>_1): Use x87nonimm_ssenomem_operand as operand 1 predicate. From-SVN: r235837
This commit is contained in:
parent
79ce98bcef
commit
8b38916ad4
3 changed files with 46 additions and 32 deletions
gcc
|
@ -1,3 +1,15 @@
|
||||||
|
2016-05-03 Uros Bizjak <ubizjak@gmail.com>
|
||||||
|
|
||||||
|
* config/i386/predicates.md (x87nonimm_ssenomem_operand): Rename
|
||||||
|
from nonimm_ssenomem_operand.
|
||||||
|
(nonimm_ssenomem_operand): New predicate.
|
||||||
|
* config/i386/i386.md (extendsfdf2): Use nonimm_ssenomem_operand
|
||||||
|
as operand 0 predicate.
|
||||||
|
(*extendsfdf2): Merge from *extendsfdf2_mixed and *extendsfdf2_i387.
|
||||||
|
Disable unsupported alternatives using "enabled" attribute.
|
||||||
|
Use register_ssemem_operand as operand 0 predicate.
|
||||||
|
(*fop_<mode>_1): Use x87nonimm_ssenomem_operand as operand 1 predicate.
|
||||||
|
|
||||||
2016-05-03 Marek Polacek <polacek@redhat.com>
|
2016-05-03 Marek Polacek <polacek@redhat.com>
|
||||||
|
|
||||||
PR c/70859
|
PR c/70859
|
||||||
|
@ -48,15 +60,12 @@
|
||||||
SSA names for the result false.
|
SSA names for the result false.
|
||||||
(gimplify_call_expr): If the call may return twice do not
|
(gimplify_call_expr): If the call may return twice do not
|
||||||
gimplify parameters into SSA.
|
gimplify parameters into SSA.
|
||||||
(prepare_gimple_addressable): Do not allow an SSA name as
|
(prepare_gimple_addressable): Do not allow an SSA name as temporary.
|
||||||
temporary.
|
|
||||||
(gimplify_modify_expr): Adjust assert. For noreturn calls
|
(gimplify_modify_expr): Adjust assert. For noreturn calls
|
||||||
with a SSA name LHS adjust its def.
|
with a SSA name LHS adjust its def.
|
||||||
(gimplify_save_expr): Do not allow an SSA name as save-expr
|
(gimplify_save_expr): Do not allow an SSA name as save-expr result.
|
||||||
result.
|
|
||||||
(gimplify_one_sizepos): Do not allow an SSA name as a sizepos.
|
(gimplify_one_sizepos): Do not allow an SSA name as a sizepos.
|
||||||
(gimplify_body): Init GIMPLE SSA data structures and gimplify
|
(gimplify_body): Init GIMPLE SSA data structures and gimplify into-SSA.
|
||||||
into-SSA.
|
|
||||||
(gimplify_scan_omp_clauses): Make sure OMP_CLAUSE_SIZE is not
|
(gimplify_scan_omp_clauses): Make sure OMP_CLAUSE_SIZE is not
|
||||||
an SSA name. Likewise for OMP_CLAUSE_REDUCTION operands.
|
an SSA name. Likewise for OMP_CLAUSE_REDUCTION operands.
|
||||||
(gimplify_omp_for): Likewise for OMP_CLAUSE_DECL. Likewise
|
(gimplify_omp_for): Likewise for OMP_CLAUSE_DECL. Likewise
|
||||||
|
@ -158,7 +167,7 @@
|
||||||
of fixed_reg_set.
|
of fixed_reg_set.
|
||||||
* df-scan.c (df_insn_refs_collect): Asms may reference global regs.
|
* df-scan.c (df_insn_refs_collect): Asms may reference global regs.
|
||||||
|
|
||||||
2016-05-03 bin cheng <bin.cheng@arm.com>
|
2016-05-03 Bin Cheng <bin.cheng@arm.com>
|
||||||
|
|
||||||
PR tree-optimization/56541
|
PR tree-optimization/56541
|
||||||
* doc/invoke.texi (@item max-tree-if-conversion-phi-args): New item.
|
* doc/invoke.texi (@item max-tree-if-conversion-phi-args): New item.
|
||||||
|
|
|
@ -4203,15 +4203,15 @@
|
||||||
"operands[2] = GEN_INT (-GET_MODE_SIZE (XFmode));")
|
"operands[2] = GEN_INT (-GET_MODE_SIZE (XFmode));")
|
||||||
|
|
||||||
(define_expand "extendsfdf2"
|
(define_expand "extendsfdf2"
|
||||||
[(set (match_operand:DF 0 "nonimmediate_operand")
|
[(set (match_operand:DF 0 "nonimm_ssenomem_operand")
|
||||||
(float_extend:DF (match_operand:SF 1 "general_operand")))]
|
(float_extend:DF (match_operand:SF 1 "general_operand")))]
|
||||||
"TARGET_80387 || (TARGET_SSE2 && TARGET_SSE_MATH)"
|
"TARGET_80387 || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH)"
|
||||||
{
|
{
|
||||||
/* ??? Needed for compress_float_constant since all fp constants
|
/* ??? Needed for compress_float_constant since all fp constants
|
||||||
are TARGET_LEGITIMATE_CONSTANT_P. */
|
are TARGET_LEGITIMATE_CONSTANT_P. */
|
||||||
if (CONST_DOUBLE_P (operands[1]))
|
if (CONST_DOUBLE_P (operands[1]))
|
||||||
{
|
{
|
||||||
if ((!TARGET_SSE2 || TARGET_MIX_SSE_I387)
|
if ((!SSE_FLOAT_MODE_P (DFmode) || TARGET_MIX_SSE_I387)
|
||||||
&& standard_80387_constant_p (operands[1]) > 0)
|
&& standard_80387_constant_p (operands[1]) > 0)
|
||||||
{
|
{
|
||||||
operands[1] = simplify_const_unary_operation
|
operands[1] = simplify_const_unary_operation
|
||||||
|
@ -4293,11 +4293,11 @@
|
||||||
(set (match_dup 0) (float_extend:DF (match_dup 2)))]
|
(set (match_dup 0) (float_extend:DF (match_dup 2)))]
|
||||||
"operands[2] = gen_rtx_REG (SFmode, REGNO (operands[0]));")
|
"operands[2] = gen_rtx_REG (SFmode, REGNO (operands[0]));")
|
||||||
|
|
||||||
(define_insn "*extendsfdf2_mixed"
|
(define_insn "*extendsfdf2"
|
||||||
[(set (match_operand:DF 0 "nonimmediate_operand" "=f,m,v")
|
[(set (match_operand:DF 0 "nonimm_ssenomem_operand" "=f,m,v")
|
||||||
(float_extend:DF
|
(float_extend:DF
|
||||||
(match_operand:SF 1 "nonimmediate_operand" "fm,f,vm")))]
|
(match_operand:SF 1 "nonimmediate_operand" "fm,f,vm")))]
|
||||||
"TARGET_SSE2 && TARGET_SSE_MATH"
|
"TARGET_80387 || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH)"
|
||||||
{
|
{
|
||||||
switch (which_alternative)
|
switch (which_alternative)
|
||||||
{
|
{
|
||||||
|
@ -4316,18 +4316,16 @@
|
||||||
(set_attr "prefix" "orig,orig,maybe_vex")
|
(set_attr "prefix" "orig,orig,maybe_vex")
|
||||||
(set_attr "mode" "SF,XF,DF")
|
(set_attr "mode" "SF,XF,DF")
|
||||||
(set (attr "enabled")
|
(set (attr "enabled")
|
||||||
(cond [(eq_attr "alternative" "0,1")
|
(if_then_else
|
||||||
(symbol_ref "TARGET_MIX_SSE_I387")
|
(match_test ("SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH"))
|
||||||
]
|
(if_then_else
|
||||||
(symbol_ref "true")))])
|
(eq_attr "alternative" "0,1")
|
||||||
|
(symbol_ref "TARGET_MIX_SSE_I387")
|
||||||
(define_insn "*extendsfdf2_i387"
|
(symbol_ref "true"))
|
||||||
[(set (match_operand:DF 0 "nonimmediate_operand" "=f,m")
|
(if_then_else
|
||||||
(float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "fm,f")))]
|
(eq_attr "alternative" "0,1")
|
||||||
"TARGET_80387"
|
(symbol_ref "true")
|
||||||
"* return output_387_reg_move (insn, operands);"
|
(symbol_ref "false"))))])
|
||||||
[(set_attr "type" "fmov")
|
|
||||||
(set_attr "mode" "SF,XF")])
|
|
||||||
|
|
||||||
(define_expand "extend<mode>xf2"
|
(define_expand "extend<mode>xf2"
|
||||||
[(set (match_operand:XF 0 "nonimmediate_operand")
|
[(set (match_operand:XF 0 "nonimmediate_operand")
|
||||||
|
@ -4370,9 +4368,9 @@
|
||||||
[(set (match_operand:SF 0 "nonimmediate_operand")
|
[(set (match_operand:SF 0 "nonimmediate_operand")
|
||||||
(float_truncate:SF
|
(float_truncate:SF
|
||||||
(match_operand:DF 1 "nonimmediate_operand")))]
|
(match_operand:DF 1 "nonimmediate_operand")))]
|
||||||
"TARGET_80387 || (TARGET_SSE2 && TARGET_SSE_MATH)"
|
"TARGET_80387 || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH)"
|
||||||
{
|
{
|
||||||
if (TARGET_SSE2 && TARGET_SSE_MATH && !TARGET_MIX_SSE_I387)
|
if (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH && !TARGET_MIX_SSE_I387)
|
||||||
;
|
;
|
||||||
else if (flag_unsafe_math_optimizations)
|
else if (flag_unsafe_math_optimizations)
|
||||||
;
|
;
|
||||||
|
@ -4455,7 +4453,7 @@
|
||||||
[(set (match_operand:SF 0 "nonimmediate_operand" "=fm,v")
|
[(set (match_operand:SF 0 "nonimmediate_operand" "=fm,v")
|
||||||
(float_truncate:SF
|
(float_truncate:SF
|
||||||
(match_operand:DF 1 "nonimmediate_operand" "f ,vm")))]
|
(match_operand:DF 1 "nonimmediate_operand" "f ,vm")))]
|
||||||
"TARGET_SSE2 && TARGET_SSE_MATH"
|
"SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH"
|
||||||
{
|
{
|
||||||
switch (which_alternative)
|
switch (which_alternative)
|
||||||
{
|
{
|
||||||
|
@ -9258,8 +9256,7 @@
|
||||||
[(match_operand:MODEF 1 "register_operand" "0,x,0,0")]))
|
[(match_operand:MODEF 1 "register_operand" "0,x,0,0")]))
|
||||||
(use (match_operand:<ssevecmode> 2 "nonimmediate_operand" "xm,0,X,X"))
|
(use (match_operand:<ssevecmode> 2 "nonimmediate_operand" "xm,0,X,X"))
|
||||||
(clobber (reg:CC FLAGS_REG))]
|
(clobber (reg:CC FLAGS_REG))]
|
||||||
"(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
|
"TARGET_80387 || (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)"
|
||||||
|| TARGET_80387"
|
|
||||||
"#"
|
"#"
|
||||||
[(set (attr "enabled")
|
[(set (attr "enabled")
|
||||||
(if_then_else
|
(if_then_else
|
||||||
|
@ -14063,9 +14060,9 @@
|
||||||
[(set (match_operand:MODEF 0 "register_operand" "=f,f,x,v")
|
[(set (match_operand:MODEF 0 "register_operand" "=f,f,x,v")
|
||||||
(match_operator:MODEF 3 "binary_fp_operator"
|
(match_operator:MODEF 3 "binary_fp_operator"
|
||||||
[(match_operand:MODEF 1
|
[(match_operand:MODEF 1
|
||||||
"nonimm_ssenomem_operand" "0,fm,0,v")
|
"x87nonimm_ssenomem_operand" "0,fm,0,v")
|
||||||
(match_operand:MODEF 2
|
(match_operand:MODEF 2
|
||||||
"nonimmediate_operand" "fm,0,xm,vm")]))]
|
"nonimmediate_operand" "fm,0,xm,vm")]))]
|
||||||
"((SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
|
"((SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
|
||||||
|| (TARGET_80387 && X87_ENABLE_ARITH (<MODE>mode)))
|
|| (TARGET_80387 && X87_ENABLE_ARITH (<MODE>mode)))
|
||||||
&& !COMMUTATIVE_ARITH_P (operands[3])
|
&& !COMMUTATIVE_ARITH_P (operands[3])
|
||||||
|
|
|
@ -131,6 +131,14 @@
|
||||||
;; Match nonimmediate operands, but exclude memory operands
|
;; Match nonimmediate operands, but exclude memory operands
|
||||||
;; for TARGET_SSE_MATH if TARGET_MIX_SSE_I387 is not enabled.
|
;; for TARGET_SSE_MATH if TARGET_MIX_SSE_I387 is not enabled.
|
||||||
(define_predicate "nonimm_ssenomem_operand"
|
(define_predicate "nonimm_ssenomem_operand"
|
||||||
|
(if_then_else
|
||||||
|
(and (match_test "SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH")
|
||||||
|
(not (match_test "TARGET_MIX_SSE_I387")))
|
||||||
|
(match_operand 0 "register_operand")
|
||||||
|
(match_operand 0 "nonimmediate_operand")))
|
||||||
|
|
||||||
|
;; The above predicate, suitable for x87 arithmetic operators.
|
||||||
|
(define_predicate "x87nonimm_ssenomem_operand"
|
||||||
(if_then_else
|
(if_then_else
|
||||||
(and (match_test "SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH")
|
(and (match_test "SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH")
|
||||||
(not (match_test "TARGET_MIX_SSE_I387 && X87_ENABLE_ARITH (mode)")))
|
(not (match_test "TARGET_MIX_SSE_I387 && X87_ENABLE_ARITH (mode)")))
|
||||||
|
|
Loading…
Add table
Reference in a new issue