summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AMDGPU/early-inline.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/early-inline.ll')
-rw-r--r--llvm/test/CodeGen/AMDGPU/early-inline.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/early-inline.ll b/llvm/test/CodeGen/AMDGPU/early-inline.ll
new file mode 100644
index 00000000000..8395ad818ab
--- /dev/null
+++ b/llvm/test/CodeGen/AMDGPU/early-inline.ll
@@ -0,0 +1,21 @@
+; RUN: opt -mtriple=amdgcn-- -O1 -S -inline-threshold=1 -amdgpu-internalize-symbols %s | FileCheck %s
+
+define i32 @callee(i32 %x) {
+entry:
+ %mul1 = mul i32 %x, %x
+ %mul2 = mul i32 %mul1, %x
+ %mul3 = mul i32 %mul1, %mul2
+ %mul4 = mul i32 %mul3, %mul2
+ %mul5 = mul i32 %mul4, %mul3
+ ret i32 %mul5
+}
+
+; CHECK-LABEL: @caller
+; CHECK: mul i32
+; CHECK-NOT: call i32
+
+define amdgpu_kernel i32 @caller(i32 %x) {
+entry:
+ %res = call i32 @callee(i32 %x)
+ ret i32 %res
+}
OpenPOWER on IntegriCloud