From 92065e1fe2e21a4d722242f6ae6827f6e31da0c8 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sat, 19 Aug 1995 17:34:03 -0400 Subject: [PATCH] (calculate_giv_inc): Handle increment computed by ASHIFT. From-SVN: r10256 --- gcc/unroll.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc/unroll.c b/gcc/unroll.c index 083f0ab831e..c5985780a82 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -1412,10 +1412,13 @@ calculate_giv_inc (pattern, src_insn, regno) one of the LO_SUM rtx. */ if (GET_CODE (increment) == LO_SUM) increment = XEXP (increment, 1); - else if (GET_CODE (increment) == IOR) + else if (GET_CODE (increment) == IOR + || GET_CODE (increment) == ASHIFT) { - /* The rs6000 port loads some constants with IOR. */ + /* The rs6000 port loads some constants with IOR. + The alpha port loads some constants with ASHIFT. */ rtx second_part = XEXP (increment, 1); + enum rtx_code code = GET_CODE (increment); src_insn = PREV_INSN (src_insn); increment = SET_SRC (PATTERN (src_insn)); @@ -1426,7 +1429,10 @@ calculate_giv_inc (pattern, src_insn, regno) || GET_CODE (increment) != CONST_INT) abort (); - increment = GEN_INT (INTVAL (increment) | INTVAL (second_part)); + if (code == IOR) + increment = GEN_INT (INTVAL (increment) | INTVAL (second_part)); + else + increment = GEN_INT (INTVAL (increment) << INTVAL (second_part)); } if (GET_CODE (increment) != CONST_INT) -- 2.30.2