Skip to content

Commit 0ba9147

Browse files
fixup! use GSelect
1 parent 321be4f commit 0ba9147

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "RISCVRegisterBankInfo.h"
1414
#include "MCTargetDesc/RISCVMCTargetDesc.h"
1515
#include "RISCVSubtarget.h"
16+
#include "llvm/CodeGen/GlobalISel/GenericMachineInstrs.h"
1617
#include "llvm/CodeGen/MachineRegisterInfo.h"
1718
#include "llvm/CodeGen/RegisterBank.h"
1819
#include "llvm/CodeGen/RegisterBankInfo.h"
@@ -402,7 +403,8 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
402403
LLT Ty = MRI.getType(MI.getOperand(0).getReg());
403404

404405
if (Ty.isVector()) {
405-
LLT TestTy = MRI.getType(MI.getOperand(2).getReg());
406+
GSelect *Sel = cast<GSelect>(&MI);
407+
LLT TestTy = MRI.getType(Sel->getCondReg());
406408
OpdsMapping[0] = OpdsMapping[2] = OpdsMapping[3] =
407409
getVRBValueMapping(Ty.getSizeInBits().getKnownMinValue());
408410
OpdsMapping[1] =

0 commit comments

Comments
 (0)