mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-21 21:06:04 +00:00

Summary: It is possible for some passes to materialize a call to a libcall (ex: ldexp, exp2, etc), but these passes will not mark the call as a gc-leaf-function. All libcalls are actually gc-leaf-functions, so we change llvm::callsGCLeafFunction() to tell us that available libcalls are equivalent to gc-leaf-function calls. Reviewers: sanjoy, anna, reames Reviewed By: anna Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35840 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309291 91177308-0d34-0410-b5e6-96231b3b80d8
15 lines
538 B
LLVM
15 lines
538 B
LLVM
; A call to a libcall function is not a statepoint.
|
|
; This test verifies that calls to libcalls functions do not get converted to
|
|
; statepoint calls.
|
|
; RUN: opt -S -rewrite-statepoints-for-gc < %s | FileCheck %s
|
|
|
|
declare double @ldexp(double %x, i32 %n) nounwind readnone
|
|
|
|
define double @test_libcall(double %x) gc "statepoint-example" {
|
|
; CHECK-LABEL: test_libcall
|
|
; CHECK-NEXT: %res = call double @ldexp(double %x, i32 5)
|
|
; CHECK-NEXT: ret double %res
|
|
%res = call double @ldexp(double %x, i32 5) nounwind readnone
|
|
ret double %res
|
|
}
|