[llvm] [AMDGPU] Fix v_mov_b16 pair merging when the second mov reads the first (PR #227502)

Krzysztof Drewniak via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 11:54:04 PDT 2026


================
@@ -0,0 +1,106 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc -mtriple=amdgpu11.00 -mattr=+real-true16 < %s | FileCheck -check-prefixes=GFX11 %s
+; RUN: llc -mtriple=amdgpu12.00 -mattr=+real-true16 < %s | FileCheck -check-prefixes=GFX12 %s
+
+; Reduced from the rocPRIM int8 radix sort histogram kernel. On the %entry path
+; the zero vector is materialized as "v0.h = 0; v0.l = v0.h", which must not be
+; merged into a single instruction that reads the old v0.hi.
+
+define amdgpu_kernel void @histogram_i8_keys(i1 %in.range, ptr addrspace(1) %keys, <18 x i8> %other) {
----------------
krzysz00 wrote:

I'd give this a better name, but that's nitpickery

https://github.com/llvm/llvm-project/pull/227502


More information about the llvm-commits mailing list