diff options
author | Tom Rix <trix@redhat.com> | 2002-04-22 23:20:12 +0000 |
---|---|---|
committer | Tom Rix <trix@gcc.gnu.org> | 2002-04-22 23:20:12 +0000 |
commit | b7c89afe9000e63a1c0f3e8502624191e5a6135d (patch) | |
tree | 3881fba225a555ff9b2c4eac61d4a9b10ff23adb /gcc/expmed.c | |
parent | 6067f1feb2d3d76de19372a366baf3fd3b883505 (diff) | |
download | gcc-b7c89afe9000e63a1c0f3e8502624191e5a6135d.zip gcc-b7c89afe9000e63a1c0f3e8502624191e5a6135d.tar.gz gcc-b7c89afe9000e63a1c0f3e8502624191e5a6135d.tar.bz2 |
Generate constant for shift once.
From-SVN: r52644
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 76b90fa..e60ccbf 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -144,19 +144,18 @@ init_expmed () for (m = 1; m < MAX_BITS_PER_WORD; m++) { + rtx c_int = GEN_INT ((HOST_WIDE_INT) 1 << m); shift_cost[m] = shiftadd_cost[m] = shiftsub_cost[m] = 32000; XEXP (SET_SRC (PATTERN (shift_insn)), 1) = GEN_INT (m); if (recog (PATTERN (shift_insn), shift_insn, &dummy) >= 0) shift_cost[m] = rtx_cost (SET_SRC (PATTERN (shift_insn)), SET); - XEXP (XEXP (SET_SRC (PATTERN (shiftadd_insn)), 0), 1) - = GEN_INT ((HOST_WIDE_INT) 1 << m); + XEXP (XEXP (SET_SRC (PATTERN (shiftadd_insn)), 0), 1) = c_int; if (recog (PATTERN (shiftadd_insn), shiftadd_insn, &dummy) >= 0) shiftadd_cost[m] = rtx_cost (SET_SRC (PATTERN (shiftadd_insn)), SET); - XEXP (XEXP (SET_SRC (PATTERN (shiftsub_insn)), 0), 1) - = GEN_INT ((HOST_WIDE_INT) 1 << m); + XEXP (XEXP (SET_SRC (PATTERN (shiftsub_insn)), 0), 1) = c_int; if (recog (PATTERN (shiftsub_insn), shiftsub_insn, &dummy) >= 0) shiftsub_cost[m] = rtx_cost (SET_SRC (PATTERN (shiftsub_insn)), SET); } |