Skip to content

Commit

Permalink
[LoopUnswitch] Common pushing LIC's user to worklist.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296432 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
trentxintong committed Feb 28, 2017
1 parent 73ddbb7 commit c532709
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/Transforms/Scalar/LoopUnswitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1332,13 +1332,11 @@ void LoopUnswitch::RewriteLoopBodyWithConditionConstant(Loop *L, Value *LIC,
// dead by replacing all its users and push it onto the worklist so that
// it can be properly deleted and its operands simplified.
UI->replaceAllUsesWith(Replacement);
Worklist.push_back(UI);
continue;
}
}

// Unable to simplify with non-valueness, push it into the worklist so that
// SimplifyCode can attempt to simplify it.
// This is a LIC user, push it into the worklist so that SimplifyCode can
// attempt to simplify it.
Worklist.push_back(UI);

// If we know that LIC is not Val, use this info to simplify code.
Expand Down

0 comments on commit c532709

Please sign in to comment.