Skip to content

Commit

Permalink
[InstCombine] Add pre-commit tests for PR59555. NFC.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtcxzyw committed Sep 25, 2023
1 parent a753045 commit 92a394e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions llvm/test/Transforms/InstCombine/icmp-range.ll
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 92a394e

Please sign in to comment.