< prev index next >

src/share/vm/opto/loopnode.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 383,394 **** PhiNode *phi = xphi->as_Phi(); // Phi must be of loop header; backedge must wrap to increment if (phi->region() != x) return false; ! if (trunc1 == NULL && phi->in(LoopNode::LoopBackControl) != incr || ! trunc1 != NULL && phi->in(LoopNode::LoopBackControl) != trunc1) { return false; } Node *init_trip = phi->in(LoopNode::EntryControl); // If iv trunc type is smaller than int, check for possible wrap. --- 383,394 ---- PhiNode *phi = xphi->as_Phi(); // Phi must be of loop header; backedge must wrap to increment if (phi->region() != x) return false; ! if ((trunc1 == NULL && phi->in(LoopNode::LoopBackControl) != incr) || ! (trunc1 != NULL && phi->in(LoopNode::LoopBackControl) != trunc1)) { return false; } Node *init_trip = phi->in(LoopNode::EntryControl); // If iv trunc type is smaller than int, check for possible wrap.
*** 428,442 **** // If the condition is inverted and we will be rolling // through MININT to MAXINT, then bail out. if (bt == BoolTest::eq || // Bail out, but this loop trips at most twice! // Odd stride ! bt == BoolTest::ne && stride_con != 1 && stride_con != -1 || // Count down loop rolls through MAXINT ! (bt == BoolTest::le || bt == BoolTest::lt) && stride_con < 0 || // Count up loop rolls through MININT ! (bt == BoolTest::ge || bt == BoolTest::gt) && stride_con > 0) { return false; // Bail out } const TypeInt* init_t = gvn->type(init_trip)->is_int(); const TypeInt* limit_t = gvn->type(limit)->is_int(); --- 428,442 ---- // If the condition is inverted and we will be rolling // through MININT to MAXINT, then bail out. if (bt == BoolTest::eq || // Bail out, but this loop trips at most twice! // Odd stride ! (bt == BoolTest::ne && stride_con != 1 && stride_con != -1) || // Count down loop rolls through MAXINT ! ((bt == BoolTest::le || bt == BoolTest::lt) && stride_con < 0) || // Count up loop rolls through MININT ! ((bt == BoolTest::ge || bt == BoolTest::gt) && stride_con > 0)) { return false; // Bail out } const TypeInt* init_t = gvn->type(init_trip)->is_int(); const TypeInt* limit_t = gvn->type(limit)->is_int();
< prev index next >