mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Temporarily reverting 46959.
llvm-svn: 47542
This commit is contained in:
parent
432abc0479
commit
e283043860
@ -1919,8 +1919,8 @@ SCEVHandle ScalarEvolutionsImpl::ComputeIterationCount(const Loop *L) {
|
||||
|
||||
// At this point, we would like to compute how many iterations of the
|
||||
// loop the predicate will return true for these inputs.
|
||||
if (LHS->isLoopInvariant(L) && !RHS->isLoopInvariant(L)) {
|
||||
// If there is a loop-invariant, force it into the RHS.
|
||||
if (isa<SCEVConstant>(LHS) && !isa<SCEVConstant>(RHS)) {
|
||||
// If there is a constant, force it into the RHS.
|
||||
std::swap(LHS, RHS);
|
||||
Cond = ICmpInst::getSwappedPredicate(Cond);
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-as < %s | opt -scalar-evolution -analyze | grep {Loop header: ( 0 smax %n) iterations!}
|
||||
; XFAIL: *
|
||||
|
||||
define void @foo(i32 %n) {
|
||||
entry:
|
||||
|
Loading…
Reference in New Issue
Block a user