File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
llvm/lib/Target/RISCV/GISel Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 13
13
#include " RISCVRegisterBankInfo.h"
14
14
#include " MCTargetDesc/RISCVMCTargetDesc.h"
15
15
#include " RISCVSubtarget.h"
16
+ #include " llvm/CodeGen/GlobalISel/GenericMachineInstrs.h"
16
17
#include " llvm/CodeGen/MachineRegisterInfo.h"
17
18
#include " llvm/CodeGen/RegisterBank.h"
18
19
#include " llvm/CodeGen/RegisterBankInfo.h"
@@ -402,7 +403,8 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
402
403
LLT Ty = MRI.getType (MI.getOperand (0 ).getReg ());
403
404
404
405
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 ());
406
408
OpdsMapping[0 ] = OpdsMapping[2 ] = OpdsMapping[3 ] =
407
409
getVRBValueMapping (Ty.getSizeInBits ().getKnownMinValue ());
408
410
OpdsMapping[1 ] =
You can’t perform that action at this time.
0 commit comments