1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/test/ExecutionEngine/fma3-jit.ll
Stefan Gränitz b608c4e35f Re-apply "[lli] Make -jit-kind=orc the default JIT engine"
MCJIT served well as the default JIT engine in lli for a long time, but the code is getting old and maintenance efforts don't seem to be in sight. In the meantime Orc became mature enough to fill that gap. The newly added greddy mode is very similar to the execution model of MCJIT. It should work as a drop-in replacement for common JIT tasks.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D98931
2021-03-30 12:08:26 +02:00

20 lines
522 B
LLVM

; RUN: %lli -jit-kind=mcjit %s | FileCheck %s
; RUN: %lli %s | FileCheck %s
; REQUIRES: fma3
; CHECK: 12.000000
@msg_double = internal global [4 x i8] c"%f\0A\00"
declare i32 @printf(i8*, ...)
define i32 @main() {
%fma = tail call double @llvm.fma.f64(double 3.0, double 3.0, double 3.0) nounwind readnone
%ptr1 = getelementptr [4 x i8], [4 x i8]* @msg_double, i32 0, i32 0
call i32 (i8*,...) @printf(i8* %ptr1, double %fma)
ret i32 0
}
declare double @llvm.fma.f64(double, double, double) nounwind readnone