[llvm] [AMDGPU] Detect kills in register sets when trying to form V_CMPX instructions. (PR #68293)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 5 03:12:22 PDT 2023
================
@@ -0,0 +1,25 @@
+# RUN: llc -march=amdgcn -mcpu=gfx1100 -run-pass=si-optimize-exec-masking -verify-machineinstrs %s -o - | FileCheck -check-prefix=GFX1100 %s
+
+---
+
+# GFX1100-LABEL: name: vcmp_saveexec_to_vcmpx_set_kill
+# GFX1100-NOT: V_CMPX
+name: vcmp_saveexec_to_vcmpx_set_kill
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $sgpr43, $sgpr44, $sgpr45, $sgpr55, $sgpr62, $sgpr63, $sgpr64, $sgpr65, $sgpr66, $sgpr67, $vgpr40, $vgpr41, $vgpr76, $vgpr77, $vgpr78, $vgpr95, $vgpr109, $vgpr110, $vgpr111, $sgpr48_sgpr49_sgpr50_sgpr51:0x000000000000000C, $sgpr52_sgpr53_sgpr54_sgpr55:0x0000000000000003, $sgpr34_sgpr35, $sgpr36_sgpr37, $sgpr38_sgpr39, $sgpr40_sgpr41, $sgpr56_sgpr57, $sgpr58_sgpr59, $sgpr60_sgpr61, $vgpr92_vgpr93_vgpr94_vgpr95:0x000000000000003F, $vgpr104_vgpr105_vgpr106_vgpr107:0x000000000000003F, $vgpr46_vgpr47:0x000000000000000F, $vgpr60_vgpr61:0x000000000000000F, $vgpr62_vgpr63:0x000000000000000C, $vgpr72_vgpr73:0x000000000000000F, $vgpr74_vgpr75:0x000000000000000F, $vgpr88_vgpr89:0x000000000000000C, $vgpr90_vgpr91:0x0000000000000003, $vgpr124_vgpr125:0x000000000000000F, $vgpr126_vgpr127:0x000000000000000F
+
+ liveins: $vgpr0
+ renamable $vgpr1 = COPY $vgpr0, implicit $exec
+ renamable $sgpr0 = S_MOV_B32 0
+ renamable $sgpr1 = COPY renamable $sgpr0
+ renamable $vgpr0 = V_MOV_B32_e32 0, implicit $exec
+ renamable $vcc_lo = V_CMP_EQ_U32_e64 0, $vgpr1, implicit $exec
+ renamable $sgpr2 = COPY renamable $sgpr0
+ renamable $sgpr3 = COPY renamable $sgpr0
+ BUFFER_STORE_DWORDX2_OFFSET_exact killed $vgpr0_vgpr1, killed $sgpr0_sgpr1_sgpr2_sgpr3, 0, 344, 1, 0, implicit $exec :: (dereferenceable store (s64), align 1, addrspace 8)
----------------
jayfoad wrote:
Wouldn't it be better to do the cmpx optimization and remove the killed flag from $vgpr0_vgpr1 here?
https://github.com/llvm/llvm-project/pull/68293
More information about the llvm-commits
mailing list