swh:1:snp:a72e953ecd624a7df6e6196bbdd05851996c5e40
Raw File
Tip revision: f57d29dd51944d513d5d9b7992520b25fd22d7f0 authored by Rafael Fourquet on 26 April 2021, 13:29:35 UTC
add `zeros!` and `ones!`, mutating versions of `zeros` and `ones`
Tip revision: f57d29d
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