Files
llvm/test/CodeGen/AMDGPU/early-inline.ll
T
Konstantin Zhuravlyov f6fa4ce469 [AMDGPU] Run always inliner early in opt
Differential Revision: https://reviews.llvm.org/D31141


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298281 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-20 18:06:45 +00:00

22 lines
468 B
LLVM

; 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
}