+2010-06-07 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.md (*add<mode>_1): Remove alternative 2.
+ <TYPE_LEA>: Split instruction.
+ <default>: Remove alternative 2 handling.
+ (*addsi_1_zext) <TYPE_LEA>: Split instruction.
+ (add lea splitter): Generate SImode lea for mode sizes <= SImode.
+ (add_zext lea splitter): Use ix86_lea_for_add_ok in insn predicate.
+
+ (*movsi_1) <TYPE_LEA>: Use %a modifier to output operand 1.
+ (ashift_zext lea splitter): Use DImode for multiplication.
+
+ * config/i386/i386.c (ix86_expand_epilogue): Do not use ix86_gen_add
+ to generate addition.
+
2010-06-07 Joseph Myers <joseph@codesourcery.com>
* common.opt (fira-verbose): Use Var.
flag_detailed_statistics, flag_remove_unreachable_functions):
Remove.
* toplev.c (flag_detailed_statistics, flag_signed_char,
- flag_short_enums, flag_pcc_struct_return, flag_ira_verbose):
- Remove.
+ flag_short_enums, flag_pcc_struct_return, flag_ira_verbose): Remove.
(DEFAULT_PCC_STRUCT_RETURN): Move definition to defaults.h.
* toplev.h (flag_crossjumping, flag_if_conversion,
flag_if_conversion2, flag_keep_static_consts, flag_peel_loops,
and above and defer till target is known.
(optimization_options): Turn on zee pass if TARGET_64BIT is set and
turn off otherwise.
-
+
2010-05-25 Jan Hubicka <jh@suse.cz>
* df-core.c (df_set_blocks): Use bitmap_head instead of bitmap.
2010-06-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/20000
- * c-decl.c (grokdeclarator): Delete warning.
+ * c-decl.c (grokdeclarator): Delete warning.
2010-06-06 Eric Botcazou <ebotcazou@adacore.com>
2010-06-04 H.J. Lu <hongjiu.lu@intel.com>
PR boostrap/44421
- * df-problems.c (df_lr_bb_local_compute): Updated for embedded
- bitmaps.
+ * df-problems.c (df_lr_bb_local_compute): Updated for embedded bitmaps.
(df_byte_lr_bb_local_compute): Likewise.
2010-06-03 Jason Merrill <jason@redhat.com>
(*addqi_1_lea) <TYPE_INCDEC, default>: Ditto.
(*add<mode>_2) <TYPE_INCDEC>: Remove assert that operand 0
and operand 1 are equal.
- <default>: Ditto. Remove ??? comment.
+ <default>: Ditto. Remove ??? comment.
(*add<mode>_3) <TYPE_INCDEC>: Remove assert that operand 0
and operand 1 are equal.
- <default>: Ditto. Remove ??? comment.
- (*adddi_4) <default>: Remove assert that operand 0 and operand 1
+ <default>: Ditto. Remove ??? comment.
+ (*adddi_4) <default>: Remove assert that operand 0 and operand 1
are equal.
(*add<mode>_4) <default>: Ditto.
(*add<mode>_5) <TYPE_INCDEC, default>: Ditto.
return "movd\t{%1, %0|%0, %1}";
case TYPE_LEA:
- return "lea{l}\t{%1, %0|%0, %1}";
+ return "lea{l}\t{%a1, %0|%0, %a1}";
default:
gcc_assert (!flag_pic || LEGITIMATE_PIC_OPERAND_P (operands[1]));
(set_attr "mode" "SI")])
(define_insn "*add<mode>_1"
- [(set (match_operand:SWI48 0 "nonimmediate_operand" "=r,rm,r,r")
+ [(set (match_operand:SWI48 0 "nonimmediate_operand" "=r,rm,r")
(plus:SWI48
- (match_operand:SWI48 1 "nonimmediate_operand" "%0,0,r,r")
- (match_operand:SWI48 2 "<general_operand>" "<g>,r<i>,0,l<i>")))
+ (match_operand:SWI48 1 "nonimmediate_operand" "%0,0,r")
+ (match_operand:SWI48 2 "<general_operand>" "<g>,r<i>,l<i>")))
(clobber (reg:CC FLAGS_REG))]
"ix86_binary_operator_ok (PLUS, <MODE>mode, operands)"
{
switch (get_attr_type (insn))
{
case TYPE_LEA:
- operands[2] = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
- return "lea{<imodesuffix>}\t{%a2, %0|%0, %a2}";
+ return "#";
case TYPE_INCDEC:
gcc_assert (rtx_equal_p (operands[0], operands[1]));
}
default:
- /* Use add as much as possible to replace lea for AGU optimization. */
- if (which_alternative == 2 && TARGET_OPT_AGU)
- return "add{<imodesuffix>}\t{%1, %0|%0, %1}";
-
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}";
}
}
[(set (attr "type")
- (cond [(and (eq_attr "alternative" "2")
- (eq (symbol_ref "TARGET_OPT_AGU") (const_int 0)))
+ (cond [(eq_attr "alternative" "2")
(const_string "lea")
- (eq_attr "alternative" "3")
- (const_string "lea")
(match_operand:SWI48 2 "incdec_operand" "")
(const_string "incdec")
]
switch (get_attr_type (insn))
{
case TYPE_LEA:
- operands[2] = XEXP (SET_SRC (XVECEXP (PATTERN (insn), 0, 0)), 0);
- return "lea{l}\t{%a2, %k0|%k0, %a2}";
+ return "#";
case TYPE_INCDEC:
if (operands[2] == const1_rtx)
(const_string "none")))
(set_attr "mode" "QI")])
+;; Convert lea to the lea pattern to avoid flags dependency.
+(define_split
+ [(set (match_operand:DI 0 "register_operand" "")
+ (plus:DI (match_operand:DI 1 "register_operand" "")
+ (match_operand:DI 2 "x86_64_nonmemory_operand" "")))
+ (clobber (reg:CC FLAGS_REG))]
+ "TARGET_64BIT && reload_completed
+ && ix86_lea_for_add_ok (PLUS, insn, operands)"
+ [(set (match_dup 0)
+ (plus:DI (match_dup 1)
+ (match_dup 2)))]
+ "")
+
+;; Convert lea to the lea pattern to avoid flags dependency.
+(define_split
+ [(set (match_operand 0 "register_operand" "")
+ (plus (match_operand 1 "register_operand" "")
+ (match_operand 2 "nonmemory_operand" "")))
+ (clobber (reg:CC FLAGS_REG))]
+ "reload_completed
+ && ix86_lea_for_add_ok (PLUS, insn, operands)
+ && GET_MODE_SIZE (GET_MODE (operands[0])) <= 4"
+ [(const_int 0)]
+{
+ rtx pat;
+ enum machine_mode mode = GET_MODE (operands[0]);
+
+ if (GET_MODE_SIZE (mode) < 4)
+ operands[0] = gen_lowpart (SImode, operands[0]);
+ if (mode != Pmode)
+ {
+ operands[1] = gen_lowpart (Pmode, operands[1]);
+ operands[2] = gen_lowpart (Pmode, operands[2]);
+ }
+
+ pat = gen_rtx_PLUS (Pmode, operands[1], operands[2]);
+ if (Pmode != SImode)
+ pat = gen_rtx_SUBREG (SImode, pat, 0);
+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], pat));
+ DONE;
+})
+
+;; Convert lea to the lea pattern to avoid flags dependency.
+(define_split
+ [(set (match_operand:DI 0 "register_operand" "")
+ (zero_extend:DI
+ (plus:SI (match_operand:SI 1 "register_operand" "")
+ (match_operand:SI 2 "nonmemory_operand" ""))))
+ (clobber (reg:CC FLAGS_REG))]
+ "TARGET_64BIT && reload_completed
+ && ix86_lea_for_add_ok (PLUS, insn, operands)"
+ [(set (match_dup 0)
+ (zero_extend:DI (subreg:SI (plus:DI (match_dup 1) (match_dup 2)) 0)))]
+{
+ operands[1] = gen_lowpart (Pmode, operands[1]);
+ operands[2] = gen_lowpart (Pmode, operands[2]);
+})
+
(define_insn "*add<mode>_2"
[(set (reg FLAGS_REG)
(compare
}
[(set_attr "type" "lea")
(set_attr "mode" "SI")])
-
-;; Convert lea to the lea pattern to avoid flags dependency.
-(define_split
- [(set (match_operand:DI 0 "register_operand" "")
- (plus:DI (match_operand:DI 1 "register_operand" "")
- (match_operand:DI 2 "x86_64_nonmemory_operand" "")))
- (clobber (reg:CC FLAGS_REG))]
- "TARGET_64BIT && reload_completed
- && ix86_lea_for_add_ok (PLUS, insn, operands)"
- [(set (match_dup 0)
- (plus:DI (match_dup 1)
- (match_dup 2)))]
- "")
-
-;; Convert lea to the lea pattern to avoid flags dependency.
-(define_split
- [(set (match_operand 0 "register_operand" "")
- (plus (match_operand 1 "register_operand" "")
- (match_operand 2 "nonmemory_operand" "")))
- (clobber (reg:CC FLAGS_REG))]
- "reload_completed && ix86_lea_for_add_ok (PLUS, insn, operands)"
- [(const_int 0)]
-{
- rtx pat;
- /* In -fPIC mode the constructs like (const (unspec [symbol_ref]))
- may confuse gen_lowpart. */
- if (GET_MODE (operands[0]) != Pmode)
- {
- operands[1] = gen_lowpart (Pmode, operands[1]);
- operands[2] = gen_lowpart (Pmode, operands[2]);
- }
- operands[0] = gen_lowpart (SImode, operands[0]);
- pat = gen_rtx_PLUS (Pmode, operands[1], operands[2]);
- if (Pmode != SImode)
- pat = gen_rtx_SUBREG (SImode, pat, 0);
- emit_insn (gen_rtx_SET (VOIDmode, operands[0], pat));
- DONE;
-})
-
-;; Convert lea to the lea pattern to avoid flags dependency.
-(define_split
- [(set (match_operand:DI 0 "register_operand" "")
- (zero_extend:DI
- (plus:SI (match_operand:SI 1 "register_operand" "")
- (match_operand:SI 2 "nonmemory_operand" ""))))
- (clobber (reg:CC FLAGS_REG))]
- "TARGET_64BIT && reload_completed
- && true_regnum (operands[0]) != true_regnum (operands[1])"
- [(set (match_dup 0)
- (zero_extend:DI (subreg:SI (plus:DI (match_dup 1) (match_dup 2)) 0)))]
-{
- operands[1] = gen_lowpart (Pmode, operands[1]);
- operands[2] = gen_lowpart (Pmode, operands[2]);
-})
\f
;; Subtract instructions
"TARGET_64BIT && reload_completed
&& true_regnum (operands[0]) != true_regnum (operands[1])"
[(set (match_dup 0)
- (zero_extend:DI (subreg:SI (mult:SI (match_dup 1) (match_dup 2)) 0)))]
+ (zero_extend:DI (subreg:SI (mult:DI (match_dup 1) (match_dup 2)) 0)))]
{
operands[1] = gen_lowpart (Pmode, operands[1]);
operands[2] = gen_int_mode (1 << INTVAL (operands[2]), Pmode);