brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 684455c Raw
41 lines · plain
1; RUN: opt < %s -passes=partial-inliner -skip-partial-inlining-cost-analysis | llc -filetype=null2; RUN: opt < %s -passes=partial-inliner -skip-partial-inlining-cost-analysis -S | FileCheck %s3; This testcase checks to see if CodeExtractor properly inherits4;   target specific attributes for the extracted function. This can5;   cause certain instructions that depend on the attributes to not6;   be lowered. Like in this test where we try to 'select' the blendvps7;   intrinsic on x86 that requires the +sse4.1 target feature.8 9target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"10target triple = "x86_64-unknown-linux-gnu"11 12; Function Attrs: nounwind readnone13declare <4 x float> @llvm.x86.sse41.blendvps(<4 x float>, <4 x float>, <4 x float>) #014 15; Function Attrs: nounwind uwtable16define <4 x float> @inlinedFunc(i1, <4 x float>, <4 x float>, <4 x float>) #1 {17entry:18  br i1 %0, label %if.then, label %return19if.then:20; Target intrinsic that requires sse4.121  %target.call = call <4 x float> @llvm.x86.sse41.blendvps(<4 x float> %1, <4 x float> %2, <4 x float> %3)22  br label %return23return:             ; preds = %entry24  %retval = phi <4 x float> [ zeroinitializer, %entry ], [ %target.call, %if.then ]25  ret <4 x float> %retval26}27 28; Function Attrs: nounwind uwtable29define <4 x float> @dummyCaller(i1, <4 x float>, <4 x float>, <4 x float>) #1 {30entry:31  %val = call <4 x float> @inlinedFunc(i1 %0, <4 x float> %1, <4 x float> %2, <4 x float> %3)32  ret <4 x float> %val33}34 35 36attributes #0 = { nounwind readnone }37attributes #1 = { nounwind uwtable "target-cpu"="x86-64" "target-features"="+sse4.1" }38 39; CHECK: define {{.*}} @inlinedFunc.1.if.then{{.*}} [[COUNT1:#[0-9]+]]40; CHECK: [[COUNT1]] = { {{.*}} "target-cpu"="x86-64" "target-features"="+sse4.1" }41