aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2012-04-23 23:24:56 +0200
committerUros Bizjak <uros@gcc.gnu.org>2012-04-23 23:24:56 +0200
commit025735b738048b0910777555df9c5f2eff23857d (patch)
treec6c61e4b609c52d51999eed079bb3045c1835568 /gcc
parent073d123ccf7036f9b103cc73f1a9b1bc3dd90d3b (diff)
downloadgcc-025735b738048b0910777555df9c5f2eff23857d.zip
gcc-025735b738048b0910777555df9c5f2eff23857d.tar.gz
gcc-025735b738048b0910777555df9c5f2eff23857d.tar.bz2
i386.md (*add<mode>_2): Add r/r/0 alternative.
* config/i386/i386.md (*add<mode>_2): Add r/r/0 alternative. (*addsi_2_zext): Ditto. (*add<mode>_3): Ditto. (*addsi_3_zext): Ditto. (*add<mode>_5): Ditto. From-SVN: r186725
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog27
-rw-r--r--gcc/config/i386/i386.md65
-rw-r--r--gcc/testsuite/ChangeLog12
3 files changed, 75 insertions, 29 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e62b04e..6334c59 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2012-04-23 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.md (*add<mode>_2): Add r/r/0 alternative.
+ (*addsi_2_zext): Ditto.
+ (*add<mode>_3): Ditto.
+ (*addsi_3_zext): Ditto.
+ (*add<mode>_5): Ditto.
+
2012-04-23 Andrew Pinski <apinski@cavium.com>
* tree-ssa-forwprop.c (simplify_bitwise_binary): Simplify (A & B) OP0
@@ -35,14 +43,14 @@
(varpool_node): Remove reachable flag.
(cgraph_mark_if_needed): Remove.
(cgraph_mark_reachable_node): Remove.
- * tree-emutls.c (ipa_lower_emutls): Do not check
- reachable.
+ * tree-emutls.c (ipa_lower_emutls): Do not check reachable.
* cgraphunit.c (cgraph_finalize_function): Do not mark node as
reachable.
(cgraph_add_new_function): Likewise.
(cgraph_mark_if_needed): Remove.
(cgraph_analyze_function): Do not set target as reachable.
- (process_function_and_variable_attributes): Do not care about dllexport.
+ (process_function_and_variable_attributes): Do not care about
+ dllexport.
(cgraph_analyze_functions): Do not set reachable flags.
(cgraph_mark_functions_to_output): Do not check reachability.
(cgraph_copy_node_for_versioning): Do not set reachable flag.
@@ -52,7 +60,8 @@
(enqueue_cgraph_node): Use reachable pointer set.
(process_references): Likewise.
(cgraph_remove_unreachable_nodes): Likewise.
- (whole_program_function_and_variable_visibility): Do not recompute reachable.
+ (whole_program_function_and_variable_visibility): Do not recompute
+ reachable.
* trans-mem.c (ipa_tm_execute): Do not check reachable flag.
2012-04-23 Georg-Johann Lay <avr@gjlay.de>
@@ -94,7 +103,8 @@
(varpool_analyze_node): New.
(varpool_mark_needed_node): Remove.
(varpool_first_variable, varpool_next_variable): New inlines.
- (varpool_first_static_initializer, varpool_next_static_initializer): Update.
+ (varpool_first_static_initializer, varpool_next_static_initializer):
+ Update.
(FOR_EACH_STATIC_VARIABLE): Remove unused walker.
(varpool_first_defined_variable): New inline.
(varpool_next_defined_variable): New inline
@@ -114,10 +124,11 @@
when varpool is in construction.
(cgraph_analyze_functions): Rewrite.
(cgraph_expand_all_functions): Update.
- (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags.
+ (cgraph_output_in_order): Do not analyze pending decls; do not set
+ needed flags.
(cgraph_optimize): Do not analyze pending decls.
- * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other
- partition; do not mark node as needed.
+ * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects
+ in other partition; do not mark node as needed.
* dwarf2out.c (reference_to_unused): Use analyzed flag.
(premark_types_used_by_global_vars_helper): Likewise.
* ipa.c (process_references): Do not call varpool_mark_needed_node.
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 27ed5f6..5d7cc40 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -5811,10 +5811,10 @@
[(set (reg FLAGS_REG)
(compare
(plus:SWI
- (match_operand:SWI 1 "nonimmediate_operand" "%0,0")
- (match_operand:SWI 2 "<general_operand>" "<g>,<r><i>"))
+ (match_operand:SWI 1 "nonimmediate_operand" "%0,0,<r>")
+ (match_operand:SWI 2 "<general_operand>" "<g>,<r><i>,0"))
(const_int 0)))
- (set (match_operand:SWI 0 "nonimmediate_operand" "=<r>,<r>m")
+ (set (match_operand:SWI 0 "nonimmediate_operand" "=<r>,<r>m,<r>")
(plus:SWI (match_dup 1) (match_dup 2)))]
"ix86_match_ccmode (insn, CCGOCmode)
&& ix86_binary_operator_ok (PLUS, <MODE>mode, operands)"
@@ -5831,6 +5831,13 @@
}
default:
+ if (which_alternative == 2)
+ {
+ rtx tmp;
+ tmp = operands[1], operands[1] = operands[2], operands[2] = tmp;
+ }
+
+ gcc_assert (rtx_equal_p (operands[0], operands[1]));
if (x86_maybe_negate_const_int (&operands[2], <MODE>mode))
return "sub{<imodesuffix>}\t{%2, %0|%0, %2}";
@@ -5852,10 +5859,10 @@
(define_insn "*addsi_2_zext"
[(set (reg FLAGS_REG)
(compare
- (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0")
- (match_operand:SI 2 "x86_64_general_operand" "rme"))
+ (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,r")
+ (match_operand:SI 2 "x86_64_general_operand" "rme,0"))
(const_int 0)))
- (set (match_operand:DI 0 "register_operand" "=r")
+ (set (match_operand:DI 0 "register_operand" "=r,r")
(zero_extend:DI (plus:SI (match_dup 1) (match_dup 2))))]
"TARGET_64BIT && ix86_match_ccmode (insn, CCGOCmode)
&& ix86_binary_operator_ok (PLUS, SImode, operands)"
@@ -5872,6 +5879,13 @@
}
default:
+ if (which_alternative == 1)
+ {
+ rtx tmp;
+ tmp = operands[1], operands[1] = operands[2], operands[2] = tmp;
+ }
+
+ gcc_assert (rtx_equal_p (operands[0], operands[1]));
if (x86_maybe_negate_const_int (&operands[2], SImode))
return "sub{l}\t{%2, %k0|%k0, %2}";
@@ -5892,9 +5906,9 @@
(define_insn "*add<mode>_3"
[(set (reg FLAGS_REG)
(compare
- (neg:SWI (match_operand:SWI 2 "<general_operand>" "<g>"))
- (match_operand:SWI 1 "nonimmediate_operand" "%0")))
- (clobber (match_scratch:SWI 0 "=<r>"))]
+ (neg:SWI (match_operand:SWI 2 "<general_operand>" "<g>,0"))
+ (match_operand:SWI 1 "nonimmediate_operand" "%0,<r>")))
+ (clobber (match_scratch:SWI 0 "=<r>,<r>"))]
"ix86_match_ccmode (insn, CCZmode)
&& !(MEM_P (operands[1]) && MEM_P (operands[2]))"
{
@@ -5910,6 +5924,13 @@
}
default:
+ if (which_alternative == 1)
+ {
+ rtx tmp;
+ tmp = operands[1], operands[1] = operands[2], operands[2] = tmp;
+ }
+
+ gcc_assert (rtx_equal_p (operands[0], operands[1]));
if (x86_maybe_negate_const_int (&operands[2], <MODE>mode))
return "sub{<imodesuffix>}\t{%2, %0|%0, %2}";
@@ -5931,9 +5952,9 @@
(define_insn "*addsi_3_zext"
[(set (reg FLAGS_REG)
(compare
- (neg:SI (match_operand:SI 2 "x86_64_general_operand" "rme"))
- (match_operand:SI 1 "nonimmediate_operand" "%0")))
- (set (match_operand:DI 0 "register_operand" "=r")
+ (neg:SI (match_operand:SI 2 "x86_64_general_operand" "rme,0"))
+ (match_operand:SI 1 "nonimmediate_operand" "%0,r")))
+ (set (match_operand:DI 0 "register_operand" "=r,r")
(zero_extend:DI (plus:SI (match_dup 1) (match_dup 2))))]
"TARGET_64BIT && ix86_match_ccmode (insn, CCZmode)
&& ix86_binary_operator_ok (PLUS, SImode, operands)"
@@ -5950,6 +5971,13 @@
}
default:
+ if (which_alternative == 1)
+ {
+ rtx tmp;
+ tmp = operands[1], operands[1] = operands[2], operands[2] = tmp;
+ }
+
+ gcc_assert (rtx_equal_p (operands[0], operands[1]));
if (x86_maybe_negate_const_int (&operands[2], SImode))
return "sub{l}\t{%2, %k0|%k0, %2}";
@@ -6060,10 +6088,10 @@
[(set (reg FLAGS_REG)
(compare
(plus:SWI
- (match_operand:SWI 1 "nonimmediate_operand" "%0")
- (match_operand:SWI 2 "<general_operand>" "<g>"))
+ (match_operand:SWI 1 "nonimmediate_operand" "%0,<r>")
+ (match_operand:SWI 2 "<general_operand>" "<g>,0"))
(const_int 0)))
- (clobber (match_scratch:SWI 0 "=<r>"))]
+ (clobber (match_scratch:SWI 0 "=<r>,<r>"))]
"ix86_match_ccmode (insn, CCGOCmode)
&& !(MEM_P (operands[1]) && MEM_P (operands[2]))"
{
@@ -6079,6 +6107,13 @@
}
default:
+ if (which_alternative == 1)
+ {
+ rtx tmp;
+ tmp = operands[1], operands[1] = operands[2], operands[2] = tmp;
+ }
+
+ gcc_assert (rtx_equal_p (operands[0], operands[1]));
if (x86_maybe_negate_const_int (&operands[2], <MODE>mode))
return "sub{<imodesuffix>}\t{%2, %0|%0, %2}";
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 36fdbb5..abda7a8 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -21,7 +21,7 @@
2012-04-23 Jakub Jelinek <jakub@redhat.com>
PR tree-optimizations/52891
- * gcc.c-torture/compile/pr52891-1.c: New test.
+ * gcc.c-torture/compile/pr52891-1.c: New test.
* gcc.c-torture/compile/pr52891-2.c: New test.
2012-04-22 Tobias Burnus <burnus@net-b.de>
@@ -77,15 +77,15 @@
2012-04-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/52976
- gfortran.dg/reassoc_11.f: New test.
+ * gfortran.dg/reassoc_11.f: New test.
2012-04-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/52976
- gfortran.dg/reassoc_7.f: New test.
- gfortran.dg/reassoc_8.f: Likewise.
- gfortran.dg/reassoc_9.f: Likewise.
- gfortran.dg/reassoc_10.f: Likewise.
+ * gfortran.dg/reassoc_7.f: New test.
+ * gfortran.dg/reassoc_8.f: Likewise.
+ * gfortran.dg/reassoc_9.f: Likewise.
+ * gfortran.dg/reassoc_10.f: Likewise.
2012-04-18 Paolo Carlini <paolo.carlini@oracle.com>