Debian Codegraph @

llvm/test/CodeGen/PowerPC/llvm.sincospi.ppcfp128.ll

raw
1 ; XFAIL: *
2 ; UNSUPPORTED: expensive_checks
3 ; FIXME: asserts
4 ; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-gnu-linux -filetype=null -enable-legalize-types-checking=0 \
5 ; RUN: -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names %s
6
7 define { ppc_fp128, ppc_fp128 } @test_sincospi_ppcf128(ppc_fp128 %a) {
8 %result = call { ppc_fp128, ppc_fp128 } @llvm.sincospi.ppcf128(ppc_fp128 %a)
9 ret { ppc_fp128, ppc_fp128 } %result
10 }
11
12 ; FIXME: This could be made a tail call with the default expansion of llvm.sincospi.
13 define void @test_sincospi_ppcf128_void_tail_call(ppc_fp128 %a, ptr noalias %out_sin, ptr noalias %out_cos) {
14 %result = tail call { ppc_fp128, ppc_fp128 } @llvm.sincospi.ppcf128(ppc_fp128 %a)
15 %result.0 = extractvalue { ppc_fp128, ppc_fp128 } %result, 0
16 %result.1 = extractvalue { ppc_fp128, ppc_fp128 } %result, 1
17 store ppc_fp128 %result.0, ptr %out_sin, align 16
18 store ppc_fp128 %result.1, ptr %out_cos, align 16
19 ret void
20 }
21
22 ; NOTE: This would need a struct-return library call for llvm.sincospi to become a tail call.
23 define { ppc_fp128, ppc_fp128 } @test_sincospi_ppcf128_tail_call(ppc_fp128 %a) {
24 %result = tail call { ppc_fp128, ppc_fp128 } @llvm.sincospi.ppcf128(ppc_fp128 %a)
25 ret { ppc_fp128, ppc_fp128 } %result
26 }