mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 02:33:33 +00:00
isUnpredicatedTerminator should treat conditional branches as unpredicated terminator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37960 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
49ce02e408
commit
14c4655403
@ -88,6 +88,9 @@ bool TargetInstrInfo::PredicateInstruction(MachineInstr *MI,
|
|||||||
bool TargetInstrInfo::isUnpredicatedTerminator(const MachineInstr *MI) const {
|
bool TargetInstrInfo::isUnpredicatedTerminator(const MachineInstr *MI) const {
|
||||||
const TargetInstrDescriptor *TID = MI->getInstrDescriptor();
|
const TargetInstrDescriptor *TID = MI->getInstrDescriptor();
|
||||||
if (TID->Flags & M_TERMINATOR_FLAG) {
|
if (TID->Flags & M_TERMINATOR_FLAG) {
|
||||||
|
// Conditional branch is a special case.
|
||||||
|
if ((TID->Flags & M_BRANCH_FLAG) != 0 && (TID->Flags & M_BARRIER_FLAG) == 0)
|
||||||
|
return true;
|
||||||
if ((TID->Flags & M_PREDICABLE) == 0)
|
if ((TID->Flags & M_PREDICABLE) == 0)
|
||||||
return true;
|
return true;
|
||||||
return !isPredicated(MI);
|
return !isPredicated(MI);
|
||||||
|
@ -404,11 +404,18 @@ X86::CondCode X86::GetOppositeBranchCondition(X86::CondCode CC) {
|
|||||||
|
|
||||||
// For purposes of branch analysis do not count FP_REG_KILL as a terminator.
|
// For purposes of branch analysis do not count FP_REG_KILL as a terminator.
|
||||||
bool X86InstrInfo::isUnpredicatedTerminator(const MachineInstr *MI) const {
|
bool X86InstrInfo::isUnpredicatedTerminator(const MachineInstr *MI) const {
|
||||||
const TargetInstrDescriptor *TID = MI->getInstrDescriptor();
|
|
||||||
if (MI->getOpcode() == X86::FP_REG_KILL)
|
if (MI->getOpcode() == X86::FP_REG_KILL)
|
||||||
return false;
|
return false;
|
||||||
if (TID->Flags & M_TERMINATOR_FLAG)
|
|
||||||
|
const TargetInstrDescriptor *TID = MI->getInstrDescriptor();
|
||||||
|
if (TID->Flags & M_TERMINATOR_FLAG) {
|
||||||
|
// Conditional branch is a special case.
|
||||||
|
if ((TID->Flags & M_BRANCH_FLAG) != 0 && (TID->Flags & M_BARRIER_FLAG) == 0)
|
||||||
|
return true;
|
||||||
|
if ((TID->Flags & M_PREDICABLE) == 0)
|
||||||
|
return true;
|
||||||
return !isPredicated(MI);
|
return !isPredicated(MI);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user