[PATCH] D133723: [AMDGPU][GFX11] Use VGPR_32_F128 for VOP1,2,C

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 03:09:05 PDT 2022


foad added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-sitofp.mir:91-93
+    ; GFX11-NEXT: %1:vgpr_32_f128 = nofpexcept V_CVT_F16_F32_T16_e32 [[V_CVT_F32_I32_e32_]], implicit $mode, implicit $exec
+    ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY %1
+    ; GFX11-NEXT: $vgpr0 = COPY [[COPY1]]
----------------
This is undesirable. We don't want to see _f128 classes here. We should be selecting the _e64 form of the V_CVT instruction instead. If you rebase on 3743f9afeb51e0b7bdf2269583f32b7e35369168 you will see the same problem for fptosi as well as sitofp.

The fix is to change the patterns in SIInstructions.td to always use the _e64 forms: https://reviews.llvm.org/differential/diff/459699/
Pre-GFX11 this should be pretty harmless even if selecting the _e64 forms doesn't actually give any benefit.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133723



More information about the llvm-commits mailing list