[PATCH] D74926: AMDGPU/GlobalISel: Fix constant bus violation with source modifiers

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 21 04:08:45 PST 2020


nhaehnle accepted this revision.
nhaehnle added a comment.
This revision is now accepted and ready to land.

LGTM, modulo a question.



================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fadd.s32.mir:168-169
     ; GFX6: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
-    ; GFX6: [[V_ADD_F32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_F32_e64 0, [[COPY]], 1, [[COPY1]], 0, 0, implicit $exec
+    ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY1]]
+    ; GFX6: [[V_ADD_F32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_F32_e64 0, [[COPY]], 1, [[COPY2]], 0, 0, implicit $exec
     ; GFX6: S_ENDPGM 0, implicit [[V_ADD_F32_e64_]]
----------------
The COPY isn't needed in this case. Which pass is responsible for cleaning that up again, and how do you envision that working in the long term? Is that a GICombine thing?


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

https://reviews.llvm.org/D74926





More information about the llvm-commits mailing list