[clang] [llvm] [AArch64] Upgrade `llvm.aarch64.neon.{s,u}{min,max}...` intrinsics (PR #225339)

Ömer Sinan Ağacan via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 06:43:53 PDT 2026


================
@@ -2474,7 +2474,7 @@ uint32x4_t test_vmaxq_u32(uint32x4_t v1, uint32x4_t v2) {
  // LLVM: [[TMP1:%.*]] = bitcast <4 x i32> [[V2]] to <16 x i8>
  // LLVM: [[VMAXQ_V_I:%.*]] = bitcast <16 x i8> [[TMP0]] to <4 x i32>
  // LLVM: [[VMAXQ_V1_I:%.*]] = bitcast <16 x i8> [[TMP1]] to <4 x i32>
- // LLVM: [[VMAXQ_V2_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.umax.v4i32(<4 x i32> [[VMAXQ_V_I]], <4 x i32> [[VMAXQ_V1_I]])
+ // LLVM: [[VMAXQ_V2_I:%.*]] = call <4 x i32> @llvm.umax.v4i32(<4 x i32> [[VMAXQ_V_I]], <4 x i32> [[VMAXQ_V1_I]])
----------------
osa1 wrote:

Right, I just realized that I misunderstood what `AutoUpgrade` is about. (I was compiling my benchmarks from IR and thought `AutoUpgrade` runs on all IRs, not just when reading from text IR or bitcode)
I'll update this PR to make clang emit the same instructions that we upgrade here. Converting to draft for now.

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


More information about the llvm-commits mailing list