43 lines · plain
1; RUN: opt < %s -mtriple=s390x-linux-gnu -S -passes=inline | FileCheck %s2; RUN: opt < %s -mtriple=s390x-linux-gnu -S -passes='cgscc(inline)' | FileCheck %s3; Check that we only inline when we have equal target attributes.4 5define i32 @foo() #0 {6entry:7 %call = call i32 (...) @baz()8 ret i32 %call9; CHECK-LABEL: foo10; CHECK: call i32 (...) @baz()11}12 13declare i32 @baz(...) #014 15define i32 @features_subset() #1 {16entry:17 %call = call i32 @foo()18 ret i32 %call19; CHECK-LABEL: features_subset20; CHECK: call i32 (...) @baz()21}22 23define i32 @features_equal() #0 {24entry:25 %call = call i32 @foo()26 ret i32 %call27; CHECK-LABEL: features_equal28; CHECK: call i32 (...) @baz()29}30 31define i32 @features_different() #2 {32entry:33 %call = call i32 @foo()34 ret i32 %call35; CHECK-LABEL: features_different36; CHECK: call i32 @foo()37}38 39 40attributes #0 = { "target-cpu"="generic" "target-features"="+guarded-storage" }41attributes #1 = { "target-cpu"="generic" "target-features"="+guarded-storage,+enhanced-sort" }42attributes #2 = { "target-cpu"="generic" "target-features"="+concurrent-functions" }43