mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Improve comment. Thanks for Andrew for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151127 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -53,8 +53,9 @@ Value *SCEVExpander::ReuseOrCreateCast(Value *V, Type *Ty,
|
|||||||
if (U->getType() == Ty)
|
if (U->getType() == Ty)
|
||||||
if (CastInst *CI = dyn_cast<CastInst>(U))
|
if (CastInst *CI = dyn_cast<CastInst>(U))
|
||||||
if (CI->getOpcode() == Op) {
|
if (CI->getOpcode() == Op) {
|
||||||
// If the cast isn't where we want it or if it doesn't dominate
|
// If the cast isn't where we want it, create a new cast at IP.
|
||||||
// a use in BIP, fix it.
|
// Likewise, do not reuse a cast at BIP because it must dominate
|
||||||
|
// instructions that might be inserted before BIP.
|
||||||
if (BasicBlock::iterator(CI) != IP || BIP == IP) {
|
if (BasicBlock::iterator(CI) != IP || BIP == IP) {
|
||||||
// Create a new cast, and leave the old cast in place in case
|
// Create a new cast, and leave the old cast in place in case
|
||||||
// it is being used as an insert point. Clear its operand
|
// it is being used as an insert point. Clear its operand
|
||||||
|
Reference in New Issue
Block a user