https://github.com/JuliaLang/julia
Raw File
Tip revision: b5f13c3a1a08d5510a272ee9ef094cf3e4debbbf authored by Alex Arslan on 25 May 2020, 19:42:28 UTC
Set VERSION to 1.4.3 prerelease (#36007)
Tip revision: b5f13c3
fastmath.jl
# This file is a part of Julia. License is MIT: https://julialang.org/license

# RUN: julia --startup-file=no %s %t && llvm-link -S %t/* -o %t/module.ll
# RUN: cat %t/module.ll | FileCheck %s

## Notes:
# This script uses the `emit` function (defined llvmpasses.jl) to emit either
# optimized or unoptimized LLVM IR. Each function is emitted individually and
# `llvm-link` is used to create a single module that can be passed to opt.
# The order in which files are emitted and linked is important since `lit` will
# process the test cases in order.

include(joinpath("..", "testhelpers", "llvmpasses.jl"))

import Base.FastMath

# CHECK: call fast float @llvm.sqrt.f32(float %0)
emit(FastMath.sqrt_fast, Float32)
back to top