changeset 19016:a02ffe9e18dd

Don't report derived induction variable for IV backedge value
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Wed, 28 Jan 2015 12:41:40 -0800
parents ea1351d22e55
children b7797e485eb8
files graal/com.oracle.graal.loop/src/com/oracle/graal/loop/InductionVariables.java
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/InductionVariables.java	Wed Jan 28 12:39:10 2015 -0800
+++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/InductionVariables.java	Wed Jan 28 12:41:40 2015 -0800
@@ -74,6 +74,13 @@
                 if (loop.isOutsideLoop(op)) {
                     continue;
                 }
+                if (op.usages().count() == 1 && op.usages().first() == baseIvNode) {
+                    /*
+                     * This is just the base induction variable increment with no other uses so
+                     * don't bother reporting it.
+                     */
+                    continue;
+                }
                 InductionVariable iv = null;
                 ValueNode offset = addSub(op, baseIvNode);
                 ValueNode scale;