[llvm] [AMDGPU] SIPeepholeSDWA: Disable on existing SDWA instructions (PR #123942)
Frederik Harwath via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 03:14:30 PST 2025
================
@@ -0,0 +1,85 @@
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1030 -o - < %s | FileCheck -check-prefix=CHECK %s
+
+; CHECK-NOT: v_lshlrev_b32_sdwa v{{[0-9]}}, v{{[0-9]}}, v{{[0-9]}} dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_1
----------------
frederik-h wrote:
I thought it is useful because it documents the reason of the test and if you run it on the baseline (as I did) it does match, but I can use update_llc_test_checks (which I did but I stripped the output a bit and added the `CHECK-NOT` line).
The test has been reduced using llvm-reduce, using this as the check in the test script to ensure that the problematic sdwa instruction remains in the output:
```bash
llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1030 --stop-after=si-peephole-sdwa $1 -o - |& grep -E 'nsw V_LSHLREV_B32_sdwa 0, %[0-9]+, 0, %3, 0, 6, 0, 6, 5, implicit \$exec'
```
I could try to see what happens if I replace `%3` by `%[0-9]+`, too. I have not yet tried to simplify it further manually.
https://github.com/llvm/llvm-project/pull/123942
More information about the llvm-commits
mailing list