[llvm] [AMDGPU] Preserve live SCC when shrinking disjoint S_OR_B32 to S_ADDK_I32 (PR #228025)
Teja Alaghari via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 5 03:35:04 PDT 2026
================
@@ -0,0 +1,35 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
+# RUN: llc -mtriple=amdgpu9.00 -verify-machineinstrs -run-pass=si-shrink-instructions -o - %s | FileCheck -check-prefix=GCN %s
+# RUN: llc -mtriple=amdgpu9.00 -verify-machineinstrs -passes=si-shrink-instructions -o - %s | FileCheck -check-prefix=GCN %s
+
+# Disjoint S_OR_B32 sets SCC to (result != 0). S_ADDK_I32 sets SCC to signed
+# overflow, so the shrink is refused while that implicit def is live.
+
----------------
TejaX-Alaghari wrote:
Added to `shrink-insts-scalar-bit-ops.mir` file.
Let me know whether there's a better fit I missed.
https://github.com/llvm/llvm-project/pull/228025
More information about the llvm-commits
mailing list