summaryrefslogtreecommitdiffstats
path: root/gcc/unroll.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1999-03-08 16:09:05 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1999-03-08 16:09:05 +0000
commit02f1afa569313a1bffb2ee2d197d0df4dce0c4a4 (patch)
treeb8606b5e3306b357419fb22b180616ee884b4a17 /gcc/unroll.c
parentd278ec97586a4440d9904ccbbe8a540cd33352fe (diff)
downloadppe42-gcc-02f1afa569313a1bffb2ee2d197d0df4dce0c4a4.tar.gz
ppe42-gcc-02f1afa569313a1bffb2ee2d197d0df4dce0c4a4.zip
Fix cygwin toolchain build failure reported by Geoffrey Noer.
* unroll.c (loop_iterations): Only call loop_find_equiv_value if we have a REG or SUBREG. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25643 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r--gcc/unroll.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 841f06a23d1..32ed5314370 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -3830,7 +3830,11 @@ loop_iterations (loop_start, loop_end, loop_info)
if (GET_CODE (increment) != CONST_INT)
{
- increment = loop_find_equiv_value (loop_start, increment);
+ /* If we have a REG, check to see if REG holds a constant value. */
+ /* ??? Other RTL, such as (neg (reg)) is possible here, but it isn't
+ clear if it is worthwhile to try to handle such RTL. */
+ if (GET_CODE (increment) == REG || GET_CODE (increment) == SUBREG)
+ increment = loop_find_equiv_value (loop_start, increment);
if (GET_CODE (increment) != CONST_INT)
{
OpenPOWER on IntegriCloud