File tree Expand file tree Collapse file tree 3 files changed +690
-3
lines changed
test/CodeGen/RISCV/GlobalISel/regbankselect/rvv Expand file tree Collapse file tree 3 files changed +690
-3
lines changed Original file line number Diff line number Diff line change @@ -484,9 +484,10 @@ void RegisterBankInfo::applyDefaultMapping(const OperandsMapper &OpdMapper) {
484
484
// the storage. However, right now we don't necessarily bump all
485
485
// the types to storage size. For instance, we can consider
486
486
// s16 G_AND legal whereas the storage size is going to be 32.
487
- assert (OrigTy.getSizeInBits () <= NewTy.getSizeInBits () &&
488
- " Types with difference size cannot be handled by the default "
489
- " mapping" );
487
+ assert (
488
+ TypeSize::isKnownLE (OrigTy.getSizeInBits (), NewTy.getSizeInBits ()) &&
489
+ " Types with difference size cannot be handled by the default "
490
+ " mapping" );
490
491
LLVM_DEBUG (dbgs () << " \n Change type of new opd from " << NewTy << " to "
491
492
<< OrigTy);
492
493
MRI.setType (NewReg, OrigTy);
Original file line number Diff line number Diff line change @@ -470,6 +470,17 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
470
470
OpdsMapping[1 ] = GPRValueMapping;
471
471
break ;
472
472
}
473
+ case TargetOpcode::G_ICMP: {
474
+ if (MRI.getType (MI.getOperand (0 ).getReg ()).isVector ()) {
475
+ LLT DstTy = MRI.getType (MI.getOperand (0 ).getReg ());
476
+ LLT SrcTy = MRI.getType (MI.getOperand (2 ).getReg ());
477
+ OpdsMapping[0 ] =
478
+ getVRBValueMapping (DstTy.getSizeInBits ().getKnownMinValue ());
479
+ OpdsMapping[2 ] = OpdsMapping[3 ] =
480
+ getVRBValueMapping (SrcTy.getSizeInBits ().getKnownMinValue ());
481
+ }
482
+ break ;
483
+ }
473
484
case TargetOpcode::G_FCMP: {
474
485
LLT Ty = MRI.getType (MI.getOperand (2 ).getReg ());
475
486
You can’t perform that action at this time.
0 commit comments