mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
Since r234249, i1 are sext instead of zext; because of that, doing "CMP rN, #0; IT EQ/NE" isn't correct anymore. "TST #1" is the conservatively correct alternative - the tradeoff being that it doesn't have a 16-bit encoding -, so use that instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236569 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1657,12 +1657,12 @@ bool ARMFastISel::SelectSelect(const Instruction *I) {
|
||||
if (Op2Reg == 0) return false;
|
||||
}
|
||||
|
||||
unsigned CmpOpc = isThumb2 ? ARM::t2CMPri : ARM::CMPri;
|
||||
CondReg = constrainOperandRegClass(TII.get(CmpOpc), CondReg, 0);
|
||||
unsigned TstOpc = isThumb2 ? ARM::t2TSTri : ARM::TSTri;
|
||||
CondReg = constrainOperandRegClass(TII.get(TstOpc), CondReg, 0);
|
||||
AddOptionalDefs(
|
||||
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, TII.get(CmpOpc))
|
||||
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, TII.get(TstOpc))
|
||||
.addReg(CondReg)
|
||||
.addImm(0));
|
||||
.addImm(1));
|
||||
|
||||
unsigned MovCCOpc;
|
||||
const TargetRegisterClass *RC;
|
||||
|
Reference in New Issue
Block a user