[PATCH] D134354: [AMDGPU][GlobalISel] Support mad/fma_mix selection
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 05:23:46 PDT 2022
arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:4951-4958
+ if (Inst->getOpcode() == AMDGPU::G_EXTRACT_VECTOR_ELT) {
+ MachineOperand &InOp = Inst->getOperand(2);
+ if (InOp.isImm()) {
+ if (InOp.getImm() != 1)
+ return nullptr;
+ return getDefIgnoringCopies(Inst->getOperand(1).getReg(), MRI);
+ }
----------------
I'd expect this to be dead code. 16-bit vector extracts are lowered to 32-bit bit ops
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:5014-5015
+
+ // FIXME: add assert back?
+ // assert(MO->getValueType() == MVT::f16);
+
----------------
Asserting on s16 is adequate
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134354/new/
https://reviews.llvm.org/D134354
More information about the llvm-commits
mailing list