Revision 67fedc8a92aafd27d8aa6244048878d6147163a6 authored by Max Horn on 02 November 2022, 11:13:27 UTC, committed by GitHub on 02 November 2022, 11:13:27 UTC

Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com>
1 parent e304ad8
Raw File
noinline.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"))

# CHECK-LABEL: @julia_simple_noinline
@noinline function simple_noinline(A, B)
    return A + B
end

# CHECK: attributes #{{[0-9]+}} = {{{[^}]*}} noinline {{[^}]*}}}
emit(simple_noinline, Float64, Float64)
back to top