1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
3 ; RUN: -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names < %s | FileCheck %s
5 define float @call_ldexpf(float %a, i32 %b) {
6 ; CHECK-LABEL: call_ldexpf:
9 ; CHECK-NEXT: stdu r1, -32(r1)
10 ; CHECK-NEXT: std r0, 48(r1)
11 ; CHECK-NEXT: .cfi_def_cfa_offset 32
12 ; CHECK-NEXT: .cfi_offset lr, 16
13 ; CHECK-NEXT: clrldi r4, r4, 32
14 ; CHECK-NEXT: bl ldexpf
16 ; CHECK-NEXT: addi r1, r1, 32
17 ; CHECK-NEXT: ld r0, 16(r1)
20 %result = call float @ldexpf(float %a, i32 %b)
24 define double @call_ldexp(double %a, i32 %b) {
25 ; CHECK-LABEL: call_ldexp:
28 ; CHECK-NEXT: stdu r1, -32(r1)
29 ; CHECK-NEXT: std r0, 48(r1)
30 ; CHECK-NEXT: .cfi_def_cfa_offset 32
31 ; CHECK-NEXT: .cfi_offset lr, 16
32 ; CHECK-NEXT: clrldi r4, r4, 32
33 ; CHECK-NEXT: bl ldexp
35 ; CHECK-NEXT: addi r1, r1, 32
36 ; CHECK-NEXT: ld r0, 16(r1)
39 %result = call double @ldexp(double %a, i32 %b)
43 define ppc_fp128 @call_ldexpl(ppc_fp128 %a, i32 %b) {
44 ; CHECK-LABEL: call_ldexpl:
47 ; CHECK-NEXT: stdu r1, -32(r1)
48 ; CHECK-NEXT: std r0, 48(r1)
49 ; CHECK-NEXT: .cfi_def_cfa_offset 32
50 ; CHECK-NEXT: .cfi_offset lr, 16
51 ; CHECK-NEXT: clrldi r5, r5, 32
52 ; CHECK-NEXT: bl ldexpl
54 ; CHECK-NEXT: addi r1, r1, 32
55 ; CHECK-NEXT: ld r0, 16(r1)
58 %result = call ppc_fp128 @ldexpl(ppc_fp128 %a, i32 %b)
62 declare float @ldexpf(float %a, i32 %b) #0
63 declare double @ldexp(double %a, i32 %b) #0
64 declare ppc_fp128 @ldexpl(ppc_fp128 %a, i32 %b) #0
66 attributes #0 = { nounwind readonly }