aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp b/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp
index 5cee00c61fc1..0504db239f67 100644
--- a/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp
+++ b/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp
@@ -390,9 +390,10 @@ private:
static bool isCRLogical(MachineInstr &MI) {
unsigned Opc = MI.getOpcode();
return Opc == PPC::CRAND || Opc == PPC::CRNAND || Opc == PPC::CROR ||
- Opc == PPC::CRXOR || Opc == PPC::CRNOR || Opc == PPC::CREQV ||
- Opc == PPC::CRANDC || Opc == PPC::CRORC || Opc == PPC::CRSET ||
- Opc == PPC::CRUNSET || Opc == PPC::CR6SET || Opc == PPC::CR6UNSET;
+ Opc == PPC::CRXOR || Opc == PPC::CRNOR || Opc == PPC::CRNOT ||
+ Opc == PPC::CREQV || Opc == PPC::CRANDC || Opc == PPC::CRORC ||
+ Opc == PPC::CRSET || Opc == PPC::CRUNSET || Opc == PPC::CR6SET ||
+ Opc == PPC::CR6UNSET;
}
bool simplifyCode() {
bool Changed = false;
@@ -544,7 +545,7 @@ MachineInstr *PPCReduceCRLogicals::lookThroughCRCopy(unsigned Reg,
return Copy;
Register CopySrc = Copy->getOperand(1).getReg();
Subreg = Copy->getOperand(1).getSubReg();
- if (!Register::isVirtualRegister(CopySrc)) {
+ if (!CopySrc.isVirtual()) {
const TargetRegisterInfo *TRI = &TII->getRegisterInfo();
// Set the Subreg
if (CopySrc == PPC::CR0EQ || CopySrc == PPC::CR6EQ)