[llvm] [VectorCombine] Scalarize binop-like intrinsics (PR #138095)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Thu May 1 09:11:10 PDT 2025
================
@@ -0,0 +1,97 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt < %s -S -p vector-combine | FileCheck %s
+
+define <4 x i32> @umax_fixed(i32 %x, i32 %y) {
+; CHECK-LABEL: define <4 x i32> @umax_fixed(
+; CHECK-SAME: i32 [[X:%.*]], i32 [[Y:%.*]]) {
+; CHECK-NEXT: [[V_SCALAR:%.*]] = call i32 @llvm.umax.i32(i32 [[X]], i32 [[Y]])
+; CHECK-NEXT: [[TMP1:%.*]] = call <4 x i32> @llvm.umax.v4i32(<4 x i32> poison, <4 x i32> poison)
----------------
lukel97 wrote:
After doing some research I've found an old thread that says that they're supposed to have the same poison semantics as select: https://groups.google.com/g/llvm-dev/c/nyS7ud0d7J8/m/SKl42RhJBgAJ
I can see tests that were added in 864dda5fd50471acaee335c1643cbd424ef319ce. I can't find anything in the LangRef on this but I just want to confirm that this is indeed the case? cc @nikic @aqjune
https://github.com/llvm/llvm-project/pull/138095
More information about the llvm-commits
mailing list