Skip to content

Commit 518b5e8

Browse files
committed
fixup! clang-format
1 parent 09a4b76 commit 518b5e8

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -868,13 +868,11 @@ bool RISCVInstructionSelector::select(MachineInstr &MI) {
868868
return false;
869869

870870
#ifndef NDEBUG
871-
const RegisterBank &PtrRB =
872-
*RBI.getRegBank(PtrReg, *MRI, TRI);
871+
const RegisterBank &PtrRB = *RBI.getRegBank(PtrReg, *MRI, TRI);
873872
// Check that the pointer register is valid.
874873
assert(PtrRB.getID() == RISCV::GPRBRegBankID &&
875874
"Load/Store pointer operand isn't a GPR");
876-
assert(PtrTy.isPointer() &&
877-
"Load/Store pointer operand isn't a pointer");
875+
assert(PtrTy.isPointer() && "Load/Store pointer operand isn't a pointer");
878876
#endif
879877

880878
// Can only handle AddressSpace 0.
@@ -886,13 +884,12 @@ bool RISCVInstructionSelector::select(MachineInstr &MI) {
886884

887885
if (isStrongerThanMonotonic(Order)) {
888886
assert(MemSizeInBytes <= 8 && "Unexpected mem size!");
889-
static constexpr unsigned LoadOpcodes[] = {
890-
RISCV::LB_AQ, RISCV::LH_AQ, RISCV::LW_AQ, RISCV::LD_AQ
891-
};
892-
static constexpr unsigned StoreOpcodes[] = {
893-
RISCV::SB_RL, RISCV::SH_RL, RISCV::SW_RL, RISCV::SD_RL
894-
};
895-
ArrayRef<unsigned> Opcodes = isa<GLoad>(LdSt) ? LoadOpcodes : StoreOpcodes;
887+
static constexpr unsigned LoadOpcodes[] = {RISCV::LB_AQ, RISCV::LH_AQ,
888+
RISCV::LW_AQ, RISCV::LD_AQ};
889+
static constexpr unsigned StoreOpcodes[] = {RISCV::SB_RL, RISCV::SH_RL,
890+
RISCV::SW_RL, RISCV::SD_RL};
891+
ArrayRef<unsigned> Opcodes =
892+
isa<GLoad>(LdSt) ? LoadOpcodes : StoreOpcodes;
896893
MI.setDesc(TII.get(Opcodes[Log2_32(MemSizeInBytes)]));
897894
return constrainSelectedInstRegOperands(MI, TII, TRI, RBI);
898895
}

0 commit comments

Comments
 (0)