projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mark vector ctpop, cttz, and ctlz as Expand on x86.
[oota-llvm.git]
/
lib
/
Target
/
TargetInstrInfo.cpp
diff --git
a/lib/Target/TargetInstrInfo.cpp
b/lib/Target/TargetInstrInfo.cpp
index 6f6083fb2825612f6f8485d6d4bf99ce2cd8046e..e4508e43eb291e47b1adf05b1c502b969d6ff8e0 100644
(file)
--- a/
lib/Target/TargetInstrInfo.cpp
+++ b/
lib/Target/TargetInstrInfo.cpp
@@
-68,13
+68,13
@@
bool TargetInstrInfo::PredicateInstruction(MachineInstr *MI,
for (unsigned j = 0, i = 0, e = MI->getNumOperands(); i != e; ++i) {
if ((TID->OpInfo[i].Flags & M_PREDICATE_OPERAND)) {
MachineOperand &MO = MI->getOperand(i);
for (unsigned j = 0, i = 0, e = MI->getNumOperands(); i != e; ++i) {
if ((TID->OpInfo[i].Flags & M_PREDICATE_OPERAND)) {
MachineOperand &MO = MI->getOperand(i);
- if (MO.isReg()) {
+ if (MO.isReg
ister
()) {
MO.setReg(Pred[j].getReg());
MadeChange = true;
MO.setReg(Pred[j].getReg());
MadeChange = true;
- } else if (MO.isImm()) {
+ } else if (MO.isImm
ediate
()) {
MO.setImm(Pred[j].getImmedValue());
MadeChange = true;
MO.setImm(Pred[j].getImmedValue());
MadeChange = true;
- } else if (MO.isM
BB
()) {
+ } else if (MO.isM
achineBasicBlock
()) {
MO.setMachineBasicBlock(Pred[j].getMachineBasicBlock());
MadeChange = true;
}
MO.setMachineBasicBlock(Pred[j].getMachineBasicBlock());
MadeChange = true;
}
@@
-87,7
+87,13
@@
bool TargetInstrInfo::PredicateInstruction(MachineInstr *MI,
bool TargetInstrInfo::isUnpredicatedTerminator(const MachineInstr *MI) const {
const TargetInstrDescriptor *TID = MI->getInstrDescriptor();
bool TargetInstrInfo::isUnpredicatedTerminator(const MachineInstr *MI) const {
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)
+ return true;
return !isPredicated(MI);
return !isPredicated(MI);
+ }
return false;
}
return false;
}