[llvm] [AMDGPU] Try to reuse in v_cndmask register with constant from compare. (PR #131146)

Daniil Fukalov via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 13 07:48:48 PDT 2025


================
@@ -0,0 +1,171 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -verify-machineinstrs  < %s | FileCheck %s -check-prefix=GFX9
+; RUN: llc -mtriple=amdgcn -mcpu=gfx1030 -verify-machineinstrs  < %s | FileCheck %s -check-prefix=GFX10
+
----------------
dfukalov wrote:

For the cases the immediate is already inlined into v_cndmask if it was possible. E.g. in the test they are successfully inlined for gfx1030 before the moment when the patch processes v_cndmask. In such cases it just skips the instruction.

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


More information about the llvm-commits mailing list