[llvm] [VectorCombine][AMDGPU] Narrow Phi of Shuffles. (PR #140188)

Leon Clark via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 10 23:19:21 PDT 2025


================
@@ -0,0 +1,1266 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt < %s -passes=vector-combine -S -mtriple=amdgcn-amd-amdhsa | FileCheck %s --check-prefixes=CHECK
+
----------------
PeddleSpam wrote:

I've added some more arch targets and they aren't affected. The cost analysis for AMDGPU assumes vector extractions and insertions are free for types >= 32 bits. This makes it equivalent to the default cost analysis.

I don't know if this indicates we should change the cost analysis to enable/disable this transform for more/fewer types or targets. The original use case was for vectors of 32 bit floats on AMDGPU.

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


More information about the llvm-commits mailing list