[PATCH] D103659: [AMDGPU][GlobalISel] Try to use op_sel when selecting packed instructions

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 3 18:31:18 PDT 2021


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:3327
+// OutSrc. If any G_FNEG were encountered, xor the value in FNeg.
+static void stripBitcastAndFNeg(Register Src, Register &OutSrc,
+                                const MachineRegisterInfo &MRI, bool &FNeg) {
----------------
I would prefer to return the new register value instead of using the out argument


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:3348-3349
+  // Strip EXT instructions
+  if (MI->getOpcode() == AMDGPU::G_ANYEXT ||
+      MI->getOpcode() == AMDGPU::G_ZEXT || MI->getOpcode() == AMDGPU::G_SEXT) {
+    Src = MI->getOperand(1).getReg();
----------------
I don't think this is valid because it changes the bit position of the fneg


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103659/new/

https://reviews.llvm.org/D103659



More information about the llvm-commits mailing list