X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FTarget%2FAArch64%2FAArch64FastISel.cpp;h=d62692848014f64546c3ff24e5660d8c3d806f5d;hp=1e4499b8d53ae9031f53ce58e44fb062c5946992;hb=5745cad86144b8a3d47f55568daff433033cf202;hpb=d3a04223e84797a1432f10d7a153da6c258017a9 diff --git a/lib/Target/AArch64/AArch64FastISel.cpp b/lib/Target/AArch64/AArch64FastISel.cpp index 1e4499b8d53..d6269284801 100644 --- a/lib/Target/AArch64/AArch64FastISel.cpp +++ b/lib/Target/AArch64/AArch64FastISel.cpp @@ -2118,7 +2118,7 @@ bool AArch64FastISel::emitCompareAndBranch(const BranchInst *BI) { return false; if (const auto *AI = dyn_cast(LHS)) - if (AI->getOpcode() == Instruction::And) { + if (AI->getOpcode() == Instruction::And && isValueAvailable(AI)) { const Value *AndLHS = AI->getOperand(0); const Value *AndRHS = AI->getOperand(1); @@ -2165,7 +2165,7 @@ bool AArch64FastISel::emitCompareAndBranch(const BranchInst *BI) { bool Is64Bit = BW == 64; if (TestBit < 32 && TestBit >= 0) Is64Bit = false; - + unsigned Opc = OpcTable[IsBitTest][IsCmpNE][Is64Bit]; const MCInstrDesc &II = TII.get(Opc);