Commit 60c81c89 by Kazu Hirata Committed by Kazu Hirata

doloop.c, [...]: Use const0_rtx instead of GEN_INT (0).

	* doloop.c, optabs.c, regmove.c, sched-deps.c,
	config/i386/i386.c, config/i386/i386.md: Use const0_rtx
	instead of GEN_INT (0).  Do the same for other constants that
	are readily available.

From-SVN: r77160
parent 2fb00d7f
2004-02-03 Kazu Hirata <kazu@cs.umass.edu> 2004-02-03 Kazu Hirata <kazu@cs.umass.edu>
* doloop.c, optabs.c, regmove.c, sched-deps.c,
config/i386/i386.c, config/i386/i386.md: Use const0_rtx
instead of GEN_INT (0). Do the same for other constants that
are readily available.
2004-02-03 Kazu Hirata <kazu@cs.umass.edu>
* combine.c (simplify_set): Use gen_rtx_fmt_e instead of * combine.c (simplify_set): Use gen_rtx_fmt_e instead of
gen_rtx. gen_rtx.
* emit-rtl.c (init_emit_once): Use gen_rtx_PC and gen_rtx_CC0 * emit-rtl.c (init_emit_once): Use gen_rtx_PC and gen_rtx_CC0
......
...@@ -11632,9 +11632,9 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx) ...@@ -11632,9 +11632,9 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx)
emit_cmp_and_jump_insns (align_rtx, const0_rtx, EQ, NULL, emit_cmp_and_jump_insns (align_rtx, const0_rtx, EQ, NULL,
Pmode, 1, align_4_label); Pmode, 1, align_4_label);
emit_cmp_and_jump_insns (align_rtx, GEN_INT (2), EQ, NULL, emit_cmp_and_jump_insns (align_rtx, const2_rtx, EQ, NULL,
Pmode, 1, align_2_label); Pmode, 1, align_2_label);
emit_cmp_and_jump_insns (align_rtx, GEN_INT (2), GTU, NULL, emit_cmp_and_jump_insns (align_rtx, const2_rtx, GTU, NULL,
Pmode, 1, align_3_label); Pmode, 1, align_3_label);
} }
else else
...@@ -11642,7 +11642,7 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx) ...@@ -11642,7 +11642,7 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx)
/* Since the alignment is 2, we have to check 2 or 0 bytes; /* Since the alignment is 2, we have to check 2 or 0 bytes;
check if is aligned to 4 - byte. */ check if is aligned to 4 - byte. */
align_rtx = expand_binop (Pmode, and_optab, scratch1, GEN_INT (2), align_rtx = expand_binop (Pmode, and_optab, scratch1, const2_rtx,
NULL_RTX, 0, OPTAB_WIDEN); NULL_RTX, 0, OPTAB_WIDEN);
emit_cmp_and_jump_insns (align_rtx, const0_rtx, EQ, NULL, emit_cmp_and_jump_insns (align_rtx, const0_rtx, EQ, NULL,
...@@ -11728,7 +11728,7 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx) ...@@ -11728,7 +11728,7 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx)
tmpreg))); tmpreg)));
/* Emit lea manually to avoid clobbering of flags. */ /* Emit lea manually to avoid clobbering of flags. */
emit_insn (gen_rtx_SET (SImode, reg2, emit_insn (gen_rtx_SET (SImode, reg2,
gen_rtx_PLUS (Pmode, out, GEN_INT (2)))); gen_rtx_PLUS (Pmode, out, const2_rtx)));
tmp = gen_rtx_REG (CCNOmode, FLAGS_REG); tmp = gen_rtx_REG (CCNOmode, FLAGS_REG);
tmp = gen_rtx_EQ (VOIDmode, tmp, const0_rtx); tmp = gen_rtx_EQ (VOIDmode, tmp, const0_rtx);
...@@ -11755,9 +11755,9 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx) ...@@ -11755,9 +11755,9 @@ ix86_expand_strlensi_unroll_1 (rtx out, rtx src, rtx align_rtx)
/* Not in the first two. Move two bytes forward. */ /* Not in the first two. Move two bytes forward. */
emit_insn (gen_lshrsi3 (tmpreg, tmpreg, GEN_INT (16))); emit_insn (gen_lshrsi3 (tmpreg, tmpreg, GEN_INT (16)));
if (TARGET_64BIT) if (TARGET_64BIT)
emit_insn (gen_adddi3 (out, out, GEN_INT (2))); emit_insn (gen_adddi3 (out, out, const2_rtx));
else else
emit_insn (gen_addsi3 (out, out, GEN_INT (2))); emit_insn (gen_addsi3 (out, out, const2_rtx));
emit_label (end_2_label); emit_label (end_2_label);
...@@ -14487,7 +14487,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, ...@@ -14487,7 +14487,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
expand_expr (arg0, NULL_RTX, VOIDmode, 0)); expand_expr (arg0, NULL_RTX, VOIDmode, 0));
op0 = gen_reg_rtx (V2DFmode); op0 = gen_reg_rtx (V2DFmode);
emit_insn (gen_sse2_loadsd (op0, adjust_address (target, V2DFmode, 0))); emit_insn (gen_sse2_loadsd (op0, adjust_address (target, V2DFmode, 0)));
emit_insn (gen_sse2_shufpd (op0, op0, op0, GEN_INT (0))); emit_insn (gen_sse2_shufpd (op0, op0, op0, const0_rtx));
return op0; return op0;
case IX86_BUILTIN_SETPD: case IX86_BUILTIN_SETPD:
...@@ -14505,7 +14505,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, ...@@ -14505,7 +14505,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
case IX86_BUILTIN_LOADRPD: case IX86_BUILTIN_LOADRPD:
target = ix86_expand_unop_builtin (CODE_FOR_sse2_movapd, arglist, target = ix86_expand_unop_builtin (CODE_FOR_sse2_movapd, arglist,
gen_reg_rtx (V2DFmode), 1); gen_reg_rtx (V2DFmode), 1);
emit_insn (gen_sse2_shufpd (target, target, target, GEN_INT (1))); emit_insn (gen_sse2_shufpd (target, target, target, const1_rtx));
return target; return target;
case IX86_BUILTIN_LOADPD1: case IX86_BUILTIN_LOADPD1:
......
...@@ -4887,7 +4887,7 @@ ...@@ -4887,7 +4887,7 @@
emit_move_insn (tmp, operands[1]); emit_move_insn (tmp, operands[1]);
emit_insn (gen_sse_shufps (op0, tmp, tmp, emit_insn (gen_sse_shufps (op0, tmp, tmp,
GEN_INT (1))); const1_rtx));
} }
case 2: case 2:
{ {
......
/* Perform doloop optimizations /* Perform doloop optimizations
Copyright (C) 1999, 2000, 2001, 2002, 2003 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz) Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
...@@ -475,7 +475,7 @@ doloop_modify (const struct loop *loop, rtx iterations, rtx iterations_max, ...@@ -475,7 +475,7 @@ doloop_modify (const struct loop *loop, rtx iterations, rtx iterations_max,
count = GEN_INT (INTVAL (count) - 1); count = GEN_INT (INTVAL (count) - 1);
else else
count = expand_simple_binop (GET_MODE (counter_reg), MINUS, count = expand_simple_binop (GET_MODE (counter_reg), MINUS,
count, GEN_INT (1), count, const1_rtx,
0, 0, OPTAB_LIB_WIDEN); 0, 0, OPTAB_LIB_WIDEN);
} }
......
...@@ -2358,7 +2358,7 @@ expand_parity (enum machine_mode mode, rtx op0, rtx target) ...@@ -2358,7 +2358,7 @@ expand_parity (enum machine_mode mode, rtx op0, rtx target)
temp = expand_unop (wider_mode, popcount_optab, xop0, NULL_RTX, temp = expand_unop (wider_mode, popcount_optab, xop0, NULL_RTX,
true); true);
if (temp != 0) if (temp != 0)
temp = expand_binop (wider_mode, and_optab, temp, GEN_INT (1), temp = expand_binop (wider_mode, and_optab, temp, const1_rtx,
target, true, OPTAB_DIRECT); target, true, OPTAB_DIRECT);
if (temp == 0) if (temp == 0)
delete_insns_since (last); delete_insns_since (last);
...@@ -3337,9 +3337,9 @@ emit_libcall_block (rtx insns, rtx target, rtx result, rtx equiv) ...@@ -3337,9 +3337,9 @@ emit_libcall_block (rtx insns, rtx target, rtx result, rtx equiv)
rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX); rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
if (note != 0) if (note != 0)
XEXP (note, 0) = GEN_INT (-1); XEXP (note, 0) = constm1_rtx;
else else
REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EH_REGION, GEN_INT (-1), REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EH_REGION, constm1_rtx,
REG_NOTES (insn)); REG_NOTES (insn));
} }
......
...@@ -167,7 +167,7 @@ discover_flags_reg (void) ...@@ -167,7 +167,7 @@ discover_flags_reg (void)
{ {
rtx tmp; rtx tmp;
tmp = gen_rtx_REG (word_mode, 10000); tmp = gen_rtx_REG (word_mode, 10000);
tmp = gen_add3_insn (tmp, tmp, GEN_INT (2)); tmp = gen_add3_insn (tmp, tmp, const2_rtx);
/* If we get something that isn't a simple set, or a /* If we get something that isn't a simple set, or a
[(set ..) (clobber ..)], this whole function will go wrong. */ [(set ..) (clobber ..)], this whole function will go wrong. */
......
...@@ -1267,7 +1267,7 @@ sched_analyze (struct deps *deps, rtx head, rtx tail) ...@@ -1267,7 +1267,7 @@ sched_analyze (struct deps *deps, rtx head, rtx tail)
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END) || NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END)
rtx_region = GEN_INT (NOTE_EH_HANDLER (insn)); rtx_region = GEN_INT (NOTE_EH_HANDLER (insn));
else else
rtx_region = GEN_INT (0); rtx_region = const0_rtx;
loop_notes = alloc_EXPR_LIST (REG_SAVE_NOTE, loop_notes = alloc_EXPR_LIST (REG_SAVE_NOTE,
rtx_region, rtx_region,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment