This reverts commit52aeacfbf5. There isn't full agreement on a path forward yet, but there is agreement that this shouldn't land as-is. See discussion on https://reviews.llvm.org/D105338 Also reverts unreviewed "[clang] Improve `-Wnull-dereference` diag to be more in-line with reality" This reverts commitf4877c78c0. And all the related changes to tests: This reverts commit9a0152799f. This reverts commit3f7c9cc274. This reverts commit329f8197ef. This reverts commitaa9f58cc2c. This reverts commit2df37d5ddd. This reverts commita72a441812.
34 lines
766 B
LLVM
34 lines
766 B
LLVM
; RUN: opt -mtriple=amdgcn-- -O1 -S -inline-threshold=1 -amdgpu-early-inline-all %s | FileCheck %s
|
|
|
|
@c_alias = alias i32 (i32), i32 (i32)* @callee
|
|
|
|
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 void @caller(i32 %x) {
|
|
entry:
|
|
%res = call i32 @callee(i32 %x)
|
|
store volatile i32 %res, i32 addrspace(1)* undef
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: @alias_caller(
|
|
; CHECK-NOT: call
|
|
define amdgpu_kernel void @alias_caller(i32 %x) {
|
|
entry:
|
|
%res = call i32 @c_alias(i32 %x)
|
|
store volatile i32 %res, i32 addrspace(1)* undef
|
|
ret void
|
|
}
|