[llvm] 92a394e - [InstCombine] Add pre-commit tests for PR59555. NFC.
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 25 04:59:36 PDT 2023
Author: Yingwei Zheng
Date: 2023-09-25T19:58:59+08:00
New Revision: 92a394e4219cee347f187ad798258c5177612f27
URL: https://github.com/llvm/llvm-project/commit/92a394e4219cee347f187ad798258c5177612f27
DIFF: https://github.com/llvm/llvm-project/commit/92a394e4219cee347f187ad798258c5177612f27.diff
LOG: [InstCombine] Add pre-commit tests for PR59555. NFC.
Added:
Modified:
llvm/test/Transforms/InstCombine/icmp-range.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstCombine/icmp-range.ll b/llvm/test/Transforms/InstCombine/icmp-range.ll
index 893d7e1d46a709d..a6b629373946e30 100644
--- a/llvm/test/Transforms/InstCombine/icmp-range.ll
+++ b/llvm/test/Transforms/InstCombine/icmp-range.ll
@@ -1477,6 +1477,22 @@ define <2 x i1> @icmp_ne_sext_eq_otherwise_vec(<2 x i32> %a) {
ret <2 x i1> %cmp1
}
+; tests from PR59555
+define i1 @isFloat(i64 %0) {
+; CHECK-LABEL: @isFloat(
+; CHECK-NEXT: [[TMP2:%.*]] = icmp ugt i64 [[TMP0:%.*]], 281474976710655
+; CHECK-NEXT: [[TMP3:%.*]] = and i64 [[TMP0]], -281474976710656
+; CHECK-NEXT: [[TMP4:%.*]] = icmp ne i64 [[TMP3]], 281474976710656
+; CHECK-NEXT: [[TMP5:%.*]] = and i1 [[TMP2]], [[TMP4]]
+; CHECK-NEXT: ret i1 [[TMP5]]
+;
+ %2 = icmp ugt i64 %0, 281474976710655
+ %3 = and i64 %0, -281474976710656
+ %4 = icmp ne i64 %3, 281474976710656
+ %5 = and i1 %2, %4
+ ret i1 %5
+}
+
!0 = !{i32 1, i32 6}
!1 = !{i32 0, i32 6}
!2 = !{i8 0, i8 1}
More information about the llvm-commits
mailing list