[llvm] [AArch64][GlobalISel] Legalize Insert vector element (PR #81453)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 9 01:35:02 PST 2024
================
@@ -407,6 +411,14 @@ void AArch64RegisterBankInfo::applyMappingImpl(
OpdMapper.getInstrMapping().getID() <= 4) &&
"Don't know how to handle that ID");
return applyDefaultMapping(OpdMapper);
+ case TargetOpcode::G_INSERT_VECTOR_ELT: {
+ // Extend smaller gpr operands to 32 bit.
+ Builder.setInsertPt(*MI.getParent(), MI.getIterator());
+ auto Ext = Builder.buildAnyExt(LLT::scalar(32), MI.getOperand(2).getReg());
----------------
tschuett wrote:
Could you move this code into the legalizer? We only state legal types for index 0. There are no references to 1 and 2.
https://github.com/llvm/llvm-project/pull/81453
More information about the llvm-commits
mailing list