mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-13 23:25:06 +00:00
Simplify. isIdenticalToWhenDefined() checks opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129041 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -811,8 +811,7 @@ static bool HoistThenElseCodeToIf(BranchInst *BI) {
|
|||||||
I1 = BB1_Itr++;
|
I1 = BB1_Itr++;
|
||||||
while (isa<DbgInfoIntrinsic>(I2))
|
while (isa<DbgInfoIntrinsic>(I2))
|
||||||
I2 = BB2_Itr++;
|
I2 = BB2_Itr++;
|
||||||
if (I1->getOpcode() != I2->getOpcode() || isa<PHINode>(I1) ||
|
if (isa<PHINode>(I1) || !I1->isIdenticalToWhenDefined(I2) ||
|
||||||
!I1->isIdenticalToWhenDefined(I2) ||
|
|
||||||
(isa<InvokeInst>(I1) && !isSafeToHoistInvoke(BB1, BB2, I1, I2)))
|
(isa<InvokeInst>(I1) && !isSafeToHoistInvoke(BB1, BB2, I1, I2)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -840,8 +839,7 @@ static bool HoistThenElseCodeToIf(BranchInst *BI) {
|
|||||||
I2 = BB2_Itr++;
|
I2 = BB2_Itr++;
|
||||||
while (isa<DbgInfoIntrinsic>(I2))
|
while (isa<DbgInfoIntrinsic>(I2))
|
||||||
I2 = BB2_Itr++;
|
I2 = BB2_Itr++;
|
||||||
} while (I1->getOpcode() == I2->getOpcode() &&
|
} while (I1->isIdenticalToWhenDefined(I2));
|
||||||
I1->isIdenticalToWhenDefined(I2));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user