[llvm] aca2613 - [InstCombine] add test for min/max intrinsic with not ops; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 7 14:31:43 PDT 2021
Author: Sanjay Patel
Date: 2021-04-07T17:31:36-04:00
New Revision: aca26133309ef197dc591b1fd6639ef2c4aaf6f2
URL: https://github.com/llvm/llvm-project/commit/aca26133309ef197dc591b1fd6639ef2c4aaf6f2
DIFF: https://github.com/llvm/llvm-project/commit/aca26133309ef197dc591b1fd6639ef2c4aaf6f2.diff
LOG: [InstCombine] add test for min/max intrinsic with not ops; NFC
Added:
Modified:
llvm/test/Transforms/InstCombine/minmax-intrinsics.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstCombine/minmax-intrinsics.ll b/llvm/test/Transforms/InstCombine/minmax-intrinsics.ll
index a60f2e0a160d..098519cfa794 100644
--- a/llvm/test/Transforms/InstCombine/minmax-intrinsics.ll
+++ b/llvm/test/Transforms/InstCombine/minmax-intrinsics.ll
@@ -591,3 +591,18 @@ define i8 @not_umin_of_not(i8 %x, i8 %y) {
%notm = xor i8 %m, -1
ret i8 %notm
}
+
+define i8 @not_umin_of_not_constant_op(i8 %x) {
+; CHECK-LABEL: @not_umin_of_not_constant_op(
+; CHECK-NEXT: [[NOTX:%.*]] = xor i8 [[X:%.*]], -1
+; CHECK-NEXT: call void @use(i8 [[NOTX]])
+; CHECK-NEXT: [[M:%.*]] = call i8 @llvm.umin.i8(i8 [[NOTX]], i8 42)
+; CHECK-NEXT: [[NOTM:%.*]] = xor i8 [[M]], -1
+; CHECK-NEXT: ret i8 [[NOTM]]
+;
+ %notx = xor i8 %x, -1
+ call void @use(i8 %notx)
+ %m = call i8 @llvm.umin.i8(i8 %notx, i8 42)
+ %notm = xor i8 %m, -1
+ ret i8 %notm
+}
More information about the llvm-commits
mailing list