[llvm] [PatternMatching] Add generic API for matching constants using custom conditions (PR #85676)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 25 22:14:52 PDT 2024
================
@@ -421,6 +421,16 @@ define <4 x i1> @lshr_by_const_cmp_sle_value(<4 x i32> %x) {
ret <4 x i1> %r
}
+define <4 x i1> @lshr_by_const_cmp_sle_value_non_splat(<4 x i32> %x) {
+; CHECK-LABEL: @lshr_by_const_cmp_sle_value_non_splat(
+; CHECK-NEXT: [[R:%.*]] = icmp sgt <4 x i32> [[X:%.*]], <i32 -1, i32 -1, i32 -1, i32 -1>
+; CHECK-NEXT: ret <4 x i1> [[R]]
+;
+ %v = lshr <4 x i32> %x, <i32 3, i32 3, i32 3, i32 5>
+ %r = icmp sle <4 x i32> %v, %x
+ ret <4 x i1> %r
+}
----------------
nikic wrote:
Also add tests for the other three cases you modified?
https://github.com/llvm/llvm-project/pull/85676
More information about the llvm-commits
mailing list