[PATCH] D98784: [AMDGPU][GlobalISel] Fix unable to legalize G_FSHL error
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 17 15:38:11 PDT 2021
arsenm requested changes to this revision.
arsenm added a comment.
This revision now requires changes to proceed.
Needs tests. Also I have this implemented already in https://reviews.llvm.org/D76500 (IIRC I think I didn't do the promotion/narrowing parts)
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:2925
+ Register SrcReg = MI.getOperand(1).getReg();
+ int64_t SrcImm = MI.getOperand(2).getImm();
+ LLT DstTy = MRI.getType(DstReg);
----------------
This is not an immediate operand
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:2929
+ auto MIConst = MIRBuilder.buildConstant(DstTy, SrcImm);
+ MIRBuilder.buildShl(DstReg, SrcReg, MIConst->getOperand(0));
+ MI.eraseFromParent();
----------------
This isn't the equivalent operation
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98784/new/
https://reviews.llvm.org/D98784
More information about the llvm-commits
mailing list