Skip to content

Commit d2b7aab

Browse files
committed
[Xtensa] Fix tests and minor fixes in code.
1 parent 51518b9 commit d2b7aab

File tree

4 files changed

+875
-146
lines changed

4 files changed

+875
-146
lines changed

llvm/lib/Target/Xtensa/XtensaInstrInfo.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ bool XtensaInstrInfo::reverseBranchCondition(
209209
case Xtensa::BGEU:
210210
Cond[0].setImm(Xtensa::BLTU);
211211
return false;
212-
213212
case Xtensa::BEQI:
214213
Cond[0].setImm(Xtensa::BNEI);
215214
return false;
@@ -228,7 +227,6 @@ bool XtensaInstrInfo::reverseBranchCondition(
228227
case Xtensa::BLTUI:
229228
Cond[0].setImm(Xtensa::BGEUI);
230229
return false;
231-
232230
case Xtensa::BEQZ:
233231
Cond[0].setImm(Xtensa::BNEZ);
234232
return false;
@@ -241,7 +239,6 @@ bool XtensaInstrInfo::reverseBranchCondition(
241239
case Xtensa::BGEZ:
242240
Cond[0].setImm(Xtensa::BLTZ);
243241
return false;
244-
245242
default:
246243
report_fatal_error("Invalid branch condition!");
247244
}
@@ -367,19 +364,19 @@ unsigned XtensaInstrInfo::insertBranch(
367364
// Need to build two branches then
368365
// one to branch to TBB on Cond
369366
// and a second one immediately after to unconditionally jump to FBB
370-
Count = InsertBranchAtInst(MBB, MBB.end(), TBB, Cond, DL, BytesAdded);
367+
Count = insertBranchAtInst(MBB, MBB.end(), TBB, Cond, DL, BytesAdded);
371368
auto &MI = *BuildMI(&MBB, DL, get(Xtensa::J)).addMBB(FBB);
372369
Count++;
373370
if (BytesAdded)
374371
*BytesAdded += getInstSizeInBytes(MI);
375372
return Count;
376373
}
377374
// This function inserts the branch at the end of the MBB
378-
Count += InsertBranchAtInst(MBB, MBB.end(), TBB, Cond, DL, BytesAdded);
375+
Count += insertBranchAtInst(MBB, MBB.end(), TBB, Cond, DL, BytesAdded);
379376
return Count;
380377
}
381378

382-
unsigned XtensaInstrInfo::InsertBranchAtInst(MachineBasicBlock &MBB,
379+
unsigned XtensaInstrInfo::insertBranchAtInst(MachineBasicBlock &MBB,
383380
MachineBasicBlock::iterator I,
384381
MachineBasicBlock *TBB,
385382
ArrayRef<MachineOperand> Cond,

llvm/lib/Target/Xtensa/XtensaInstrInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class XtensaInstrInfo : public XtensaGenInstrInfo {
9090
const DebugLoc &DL,
9191
int *BytesAdded = nullptr) const override;
9292

93-
unsigned InsertBranchAtInst(MachineBasicBlock &MBB,
93+
unsigned insertBranchAtInst(MachineBasicBlock &MBB,
9494
MachineBasicBlock::iterator I,
9595
MachineBasicBlock *TBB,
9696
ArrayRef<MachineOperand> Cond, const DebugLoc &DL,

llvm/test/CodeGen/Xtensa/branch.ll

Lines changed: 0 additions & 139 deletions
This file was deleted.

0 commit comments

Comments
 (0)