You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.161
Former-commit-id: 4db48158d3a35497b8f118ab21b5f08ac3d86d98
This commit is contained in:
parent
37fbf886a3
commit
e19d552987
30
external/llvm/test/Transforms/Inline/ephemeral.ll
vendored
Normal file
30
external/llvm/test/Transforms/Inline/ephemeral.ll
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
; RUN: opt -S -Oz %s | FileCheck %s
|
||||
|
||||
@a = global i32 4
|
||||
|
||||
define i32 @inner() {
|
||||
%a1 = load volatile i32, i32* @a
|
||||
|
||||
; Here are enough instructions to prevent inlining, but because they are used
|
||||
; only by the @llvm.assume intrinsic, they're free (and, thus, inlining will
|
||||
; still happen).
|
||||
%a2 = mul i32 %a1, %a1
|
||||
%a3 = sub i32 %a1, 5
|
||||
%a4 = udiv i32 %a3, -13
|
||||
%a5 = mul i32 %a4, %a4
|
||||
%a6 = add i32 %a5, %a5
|
||||
%ca = icmp sgt i32 %a6, -7
|
||||
tail call void @llvm.assume(i1 %ca)
|
||||
|
||||
ret i32 %a1
|
||||
}
|
||||
|
||||
; @inner() should be inlined for -Oz.
|
||||
; CHECK-NOT: call i1 @inner
|
||||
define i32 @outer() optsize {
|
||||
%r = call i32 @inner()
|
||||
ret i32 %r
|
||||
}
|
||||
|
||||
declare void @llvm.assume(i1) nounwind
|
||||
|
Reference in New Issue
Block a user