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 @@ -488,6 +488,17 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
488
488
OpdsMapping[1 ] = GPRValueMapping;
489
489
break ;
490
490
}
491
+ case TargetOpcode::G_ICMP: {
492
+ if (MRI.getType (MI.getOperand (0 ).getReg ()).isVector ()) {
493
+ LLT DstTy = MRI.getType (MI.getOperand (0 ).getReg ());
494
+ LLT SrcTy = MRI.getType (MI.getOperand (2 ).getReg ());
495
+ OpdsMapping[0 ] =
496
+ getVRBValueMapping (DstTy.getSizeInBits ().getKnownMinValue ());
497
+ OpdsMapping[2 ] = OpdsMapping[3 ] =
498
+ getVRBValueMapping (SrcTy.getSizeInBits ().getKnownMinValue ());
499
+ }
500
+ break ;
501
+ }
491
502
case TargetOpcode::G_FCMP: {
492
503
LLT Ty = MRI.getType (MI.getOperand (2 ).getReg ());
493
504
You can’t perform that action at this time.
0 commit comments