mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -173,11 +173,11 @@ bool llvm::ConstantFoldTerminator(BasicBlock *BB) {
|
||||
BasicBlock *Dest1 = cast<BasicBlock>(BI->getOperand(0));
|
||||
BasicBlock *Dest2 = cast<BasicBlock>(BI->getOperand(1));
|
||||
|
||||
if (ConstantBool *Cond = dyn_cast<ConstantBool>(BI->getCondition())) {
|
||||
if (ConstantInt *Cond = dyn_cast<ConstantInt>(BI->getCondition())) {
|
||||
// Are we branching on constant?
|
||||
// YES. Change to unconditional branch...
|
||||
BasicBlock *Destination = Cond->getValue() ? Dest1 : Dest2;
|
||||
BasicBlock *OldDest = Cond->getValue() ? Dest2 : Dest1;
|
||||
BasicBlock *Destination = Cond->getBoolValue() ? Dest1 : Dest2;
|
||||
BasicBlock *OldDest = Cond->getBoolValue() ? Dest2 : Dest1;
|
||||
|
||||
//cerr << "Function: " << T->getParent()->getParent()
|
||||
// << "\nRemoving branch from " << T->getParent()
|
||||
|
Reference in New Issue
Block a user