[llvm] [AMDGPU] Reject SDWA forms the subtarget cannot encode (PR #218592)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 12:17:25 PDT 2026
================
@@ -0,0 +1,40 @@
+# RUN: llc -mtriple=amdgpu8.03 -run-pass=si-peephole-sdwa -verify-machineinstrs -o - %s | FileCheck %s
+# RUN: llc -mtriple=amdgpu9 -run-pass=si-peephole-sdwa -verify-machineinstrs -o - %s | FileCheck %s
+# RUN: llc -mtriple=amdgpu10.10 -run-pass=si-peephole-sdwa -verify-machineinstrs -o - %s | FileCheck %s
+
+# V_MOVRELS_B32_sdwa is unencodable on gfx8/gfx9, and asm-only
+# (SIInstrInfo::isAsmOnlyOpcode) on gfx10.
+
+---
+name: movrels_dst_no_sdwa
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $sgpr0
+
+ ; CHECK-LABEL: name: movrels_dst_no_sdwa
+ ; CHECK: V_MOVRELS_B32_e32
+ ; CHECK-NOT: V_MOVRELS_B32_sdwa
----------------
arsenm wrote:
Avoid -NOT checks, use update_mir_test_checks
https://github.com/llvm/llvm-project/pull/218592
More information about the llvm-commits
mailing list