[llvm] [AMDGPU] Fold constants in 2-elt vector canonicalization (PR #214384)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 8 08:02:57 PDT 2026
================
@@ -0,0 +1,217 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc -mtriple=amdgpu9.00 < %s | FileCheck -check-prefixes=GFX9 %s
+; RUN: llc -mtriple=amdgpu11.00 -mattr=+real-true16 < %s | FileCheck -check-prefixes=GFX11-TRUE16 %s
+
+; Test fcanonicalize optimization that scalarizes when building vectors with
+; poison or constant elements. This optimization only applies when scalar
+; fcanonicalize is legal for the element type (f16, f32, f64 - not bf16).
+
+declare <2 x half> @llvm.canonicalize.v2f16(<2 x half>)
----------------
shiltian wrote:
no need for declaration
https://github.com/llvm/llvm-project/pull/214384
More information about the llvm-commits
mailing list