brintos

brintos / llvm-project-archived public Read only

0
0
Text · 690 B · b8739c2 Raw
24 lines · plain
1; LLI.exe used to crash on Windows\X86 when certain single precession2; floating point intrinsics (defined as macros) are used.3; This unit test guards against the failure.4;5; RUN: %lli -jit-kind=mcjit %s | FileCheck %s6; RUN: %lli %s | FileCheck %s7 8@flt = internal global float 12.0e+09@str = internal constant [18 x i8] c"Double value: %f\0A\00"10 11declare i32 @printf(ptr nocapture, ...) nounwind12declare i32 @fflush(ptr) nounwind13 14define i32 @main() {15  %flt = load float, ptr @flt16  %float2 = frem float %flt, 5.017  %double1 = fpext float %float2 to double18  call i32 (ptr, ...) @printf(ptr @str, double %double1)19  call i32 @fflush(ptr null)20  ret i32 021}22 23; CHECK: Double value: 2.024