blob: 7e0b6060f6fe33aba1cf4df4086d1bfa6ca5725e [file] [log] [blame]
Reid Kleckner9aeb0472014-11-13 23:32:52 +00001; LLI.exe used to crash on Windows\X86 when certain single precession
2; floating point intrinsics (defined as macros) are used.
3; This unit test guards against the failure.
4;
5; RUN: %lli %s | FileCheck %s
6
7@flt = internal global float 12.0e+0
8@str = internal constant [18 x i8] c"Double value: %f\0A\00"
9
10declare i32 @printf(i8* nocapture, ...) nounwind
11
12define i32 @main() {
13 %flt = load float* @flt
14 %float2 = frem float %flt, 5.0
15 %double1 = fpext float %float2 to double
16 call i32 (i8*, ...)* @printf(i8* getelementptr ([18 x i8]* @str, i32 0, i64 0), double %double1)
17 ret i32 0
18}
19
20; CHECK: Double value: 2.0