Daniel Neilson | 2574d7c | 2017-07-27 16:49:39 +0000 | [diff] [blame] | 1 | ; A call to a libcall function is not a statepoint. |
| 2 | ; This test verifies that calls to libcalls functions do not get converted to |
| 3 | ; statepoint calls. |
| 4 | ; RUN: opt -S -rewrite-statepoints-for-gc < %s | FileCheck %s |
Fedor Sergeev | 4b86d79 | 2017-12-15 09:32:11 +0000 | [diff] [blame] | 5 | ; RUN: opt -S -passes=rewrite-statepoints-for-gc < %s | FileCheck %s |
Daniel Neilson | 2574d7c | 2017-07-27 16:49:39 +0000 | [diff] [blame] | 6 | |
| 7 | declare double @ldexp(double %x, i32 %n) nounwind readnone |
| 8 | |
| 9 | define double @test_libcall(double %x) gc "statepoint-example" { |
| 10 | ; CHECK-LABEL: test_libcall |
| 11 | ; CHECK-NEXT: %res = call double @ldexp(double %x, i32 5) |
| 12 | ; CHECK-NEXT: ret double %res |
| 13 | %res = call double @ldexp(double %x, i32 5) nounwind readnone |
| 14 | ret double %res |
| 15 | } |