OLD | NEW |
1 ; If LLVM is built in Release mode with a buggy gcc under x86-32, it | 1 ; If LLVM is built in Release mode with a buggy gcc under x86-32, it |
2 ; may transform 64-bit constants with a signaling NaN bit pattern into | 2 ; may transform 64-bit constants with a signaling NaN bit pattern into |
3 ; a quiet NaN bit pattern. See | 3 ; a quiet NaN bit pattern. See |
4 ; http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416 | 4 ; http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416 |
5 | 5 |
6 ; RUN: llc -march=x86-64 < %s | FileCheck %s | 6 ; RUN: llc -march=x86-64 < %s | FileCheck %s |
7 | 7 |
8 define i32 @main() #0 { | 8 define i32 @main() #0 { |
9 entry: | 9 entry: |
10 %retval = alloca i32, align 4 | 10 %retval = alloca i32, align 4 |
11 %tmp = alloca i64, align 8 | 11 %tmp = alloca i64, align 8 |
12 store i32 0, i32* %retval | 12 store i32 0, i32* %retval |
13 ; -4503599627370495 == 0xfff0000000000001 | 13 ; -4503599627370495 == 0xfff0000000000001 |
14 store i64 -4503599627370495, i64* %tmp, align 8 | 14 store i64 -4503599627370495, i64* %tmp, align 8 |
15 %0 = load i64* %tmp, align 8 | 15 %0 = load i64, i64* %tmp, align 8 |
16 call void @Consume(i64 %0) | 16 call void @Consume(i64 %0) |
17 ret i32 0 | 17 ret i32 0 |
18 } | 18 } |
19 | 19 |
20 ; CHECK: main: | 20 ; CHECK: main: |
21 ; make sure 0xfff0000000000001 didn't change to 0xfff8000000000001 | 21 ; make sure 0xfff0000000000001 didn't change to 0xfff8000000000001 |
22 ; CHECK: 0xFFF00000 | 22 ; CHECK: 0xFFF00000 |
23 ; CHECK-NOT: 0xFFF80000 | 23 ; CHECK-NOT: 0xFFF80000 |
24 | 24 |
25 declare void @Consume(i64) #1 | 25 declare void @Consume(i64) #1 |
OLD | NEW |