Skip to content

Commit d0e02a9

Browse files
committed
[Float2Int] Add pre-commit tests. NFC.
1 parent cf35502 commit d0e02a9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
2+
; RUN: opt -S -passes=float2int < %s | FileCheck %s
3+
4+
; Make sure that we don't demote constant floating-point values when
5+
; it cannot be represented by target integer type.
6+
7+
define i1 @pr167627() {
8+
; CHECK-LABEL: define i1 @pr167627() {
9+
; CHECK-NEXT: [[ENTRY:.*:]]
10+
; CHECK-NEXT: ret i1 false
11+
;
12+
entry:
13+
%fadd = fadd float 0xC5AAD8ABE0000000, 0xC57E819700000000
14+
%cmp = fcmp one float %fadd, 0.000000e+00
15+
ret i1 %cmp
16+
}

0 commit comments

Comments
 (0)