[llvm] [InstCombine] Drop poison-generating/UB-implying param attrs after changing operands (PR #115988)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 21:31:21 PST 2024
================
@@ -1541,3 +1541,14 @@ define <2 x i32> @test_umax_smax_vec_neg(<2 x i32> %x) {
%umax = call <2 x i32> @llvm.umax.v2i32(<2 x i32> %smax, <2 x i32> <i32 1, i32 10>)
ret <2 x i32> %umax
}
+
+; Make sure that poison-generating/UB-implying parameters are dropped
+
+define i32 @umax_commute_operand_drop_attrs(i32 %x) {
+; CHECK-LABEL: @umax_commute_operand_drop_attrs(
+; CHECK-NEXT: [[RET:%.*]] = call range(i32 -10, 0) i32 @llvm.umax.i32(i32 [[X:%.*]], i32 -10)
----------------
dtcxzyw wrote:
Done.
https://github.com/llvm/llvm-project/pull/115988
More information about the llvm-commits
mailing list