1 ; 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.
5 ; RUN: %lli -jit-kind=mcjit %s | FileCheck %s
6 ; RUN: %lli %s | FileCheck %s
8 @flt = internal global float 12.0e+0
9 @str = internal constant [18 x i8] c"Double value: %f\0A\00"
11 declare i32 @printf(i8* nocapture, ...) nounwind
12 declare i32 @fflush(i8*) nounwind
15 %flt = load float, float* @flt
16 %float2 = frem float %flt, 5.0
17 %double1 = fpext float %float2 to double
18 call i32 (i8*, ...) @printf(i8* getelementptr ([18 x i8], [18 x i8]* @str, i32 0, i64 0), double %double1)
19 call i32 @fflush(i8* null)
23 ; CHECK: Double value: 2.0