42 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -mtriple=wasm32-unknown-unknown -S -passes=inline | FileCheck %s3 4; Check that having functions can be inlined into callers only when5; they have a subset of the caller's features.6 7target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"8target triple = "wasm32-unknown-unknown"9 10declare void @foo()11 12define internal void @uses_simd() #0 {13; CHECK-LABEL: @uses_simd(14; CHECK-NEXT: tail call void @foo()15; CHECK-NEXT: ret void16;17 tail call void @foo()18 ret void19}20 21define void @many_features() #1 {22; CHECK-LABEL: @many_features(23; CHECK-NEXT: tail call void @foo()24; CHECK-NEXT: ret void25;26 tail call fastcc void @uses_simd()27 ret void28}29 30define void @few_features() #2 {31; CHECK-LABEL: @few_features(32; CHECK-NEXT: tail call fastcc void @uses_simd()33; CHECK-NEXT: ret void34;35 tail call fastcc void @uses_simd()36 ret void37}38 39attributes #0 = { "target-cpu"="mvp" "target-features"="+simd128"}40attributes #1 = { "target-cpu"="bleeding-edge" "target-features"="+simd128" }41attributes #2 = { "target-cpu"="mvp" "target-features"="+multivalue" }42