Files
clang-p2996/llvm/test/Transforms/Inline/AMDGPU/amdgpu-inline-alloca-argument-cost.ll
Stanislav Mekhanoshin b7b99b0799 [AMDGPU] Fix -amdgpu-inline-arg-alloca-cost
Before D94153 this threshold was in a pre-scaled units.
After D94153 inlining threshold multiplier is not applied
to this portion of the threshold anymore. Restore the
threshold by applying the multiplier.

Differential Revision: https://reviews.llvm.org/D98362
2021-03-12 10:19:50 -08:00

23 lines
729 B
LLVM

; RUN: opt -mtriple=amdgcn--amdhsa -S -passes=inline -inline-threshold=0 -debug-only=inline-cost < %s 2>&1 | FileCheck %s
; REQUIRES: asserts
target datalayout = "A5"
; Verify we are properly adding cost of the -amdgpu-inline-arg-alloca-cost to the threshold.
; CHECK: NumAllocaArgs: 1
; CHECK: Threshold: 66000
define void @use_private_ptr_arg(float addrspace(5)* nocapture %p) {
ret void
}
define amdgpu_kernel void @test_inliner_pvt_ptr(float addrspace(1)* nocapture %a, i32 %n) {
entry:
%pvt_arr = alloca [64 x float], align 4, addrspace(5)
%to.ptr = getelementptr inbounds [64 x float], [64 x float] addrspace(5)* %pvt_arr, i32 0, i32 0
call void @use_private_ptr_arg(float addrspace(5)* %to.ptr)
ret void
}