1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
2 ; RUN: llc -mtriple=aarch64 -mattr=+sve < %s -o - | FileCheck %s
4 define double @testExp(double %val, i32 %a) {
5 ; CHECK-LABEL: testExp:
6 ; CHECK: // %bb.0: // %entry
7 ; CHECK-NEXT: ptrue p0.d
8 ; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0
9 ; CHECK-NEXT: sxtw x8, w0
10 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
11 ; CHECK-NEXT: fmov d1, x8
12 ; CHECK-NEXT: fscale z0.d, p0/m, z0.d, z1.d
13 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
16 %call = tail call fast double @ldexp(double %val, i32 %a)
20 declare double @ldexp(double, i32) memory(none)
22 define float @testExpf(float %val, i32 %a) {
23 ; CHECK-LABEL: testExpf:
24 ; CHECK: // %bb.0: // %entry
25 ; CHECK-NEXT: ptrue p0.s
26 ; CHECK-NEXT: fmov s1, w0
27 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $z0
28 ; CHECK-NEXT: fscale z0.s, p0/m, z0.s, z1.s
29 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $z0
32 %call = tail call fast float @ldexpf(float %val, i32 %a)
36 declare float @ldexpf(float, i32) memory(none)
38 define fp128 @testExpl(fp128 %val, i32 %a) {
39 ; CHECK-LABEL: testExpl:
40 ; CHECK: // %bb.0: // %entry
41 ; CHECK-NEXT: b ldexpl
43 %call = tail call fast fp128 @ldexpl(fp128 %val, i32 %a)
47 declare fp128 @ldexpl(fp128, i32) memory(none)
49 define half @testExpf16(half %val, i32 %a) {
50 ; CHECK-LABEL: testExpf16:
51 ; CHECK: // %bb.0: // %entry
52 ; CHECK-NEXT: ptrue p0.s
53 ; CHECK-NEXT: fcvt s0, h0
54 ; CHECK-NEXT: fmov s1, w0
55 ; CHECK-NEXT: fscale z0.s, p0/m, z0.s, z1.s
56 ; CHECK-NEXT: fcvt h0, s0
59 %0 = tail call fast half @llvm.ldexp.f16.i32(half %val, i32 %a)
63 declare half @llvm.ldexp.f16.i32(half, i32) memory(none)