1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=thumbv7m-linux-gnueabi | FileCheck %s --check-prefixes=ANY,SOFTFLOAT
3 ; RUN: llc < %s -mtriple=thumbv8-linux-gnueabihf -mattr=neon | FileCheck %s --check-prefixes=ANY,HARDFLOAT
5 declare float @llvm.pow.f32(float, float)
6 declare <4 x float> @llvm.pow.v4f32(<4 x float>, <4 x float>)
8 declare double @llvm.pow.f64(double, double)
9 declare <2 x double> @llvm.pow.v2f64(<2 x double>, <2 x double>)
11 define float @pow_f32_one_fourth_fmf(float %x) nounwind {
12 ; ANY-LABEL: pow_f32_one_fourth_fmf:
14 ; HARDFLOAT: vsqrt.f32
15 ; HARDFLOAT: vsqrt.f32
16 %r = call nsz ninf afn float @llvm.pow.f32(float %x, float 2.5e-01)
20 define double @pow_f64_one_fourth_fmf(double %x) nounwind {
21 ; ANY-LABEL: pow_f64_one_fourth_fmf:
23 ; HARDFLOAT: vsqrt.f64
24 ; HARDFLOAT: vsqrt.f64
25 %r = call nsz ninf afn double @llvm.pow.f64(double %x, double 2.5e-01)
29 define float @pow_f32_one_third_fmf(float %x) nounwind {
30 ; ANY-LABEL: pow_f32_one_third_fmf:
33 %r = call fast float @llvm.pow.f32(float %x, float 0x3FD5555560000000)
37 define double @pow_f64_one_third_fmf(double %x) nounwind {
38 ; ANY-LABEL: pow_f64_one_third_fmf:
41 %r = call fast double @llvm.pow.f64(double %x, double 0x3FD5555555555555)
45 define <4 x float> @pow_v4f32_one_fourth_fmf(<4 x float> %x) nounwind {
46 ; ANY-LABEL: pow_v4f32_one_fourth_fmf:
51 ; HARDFLOAT: vsqrt.f32
52 ; HARDFLOAT: vsqrt.f32
53 ; HARDFLOAT: vsqrt.f32
54 ; HARDFLOAT: vsqrt.f32
55 ; HARDFLOAT: vsqrt.f32
56 ; HARDFLOAT: vsqrt.f32
57 ; HARDFLOAT: vsqrt.f32
58 ; HARDFLOAT: vsqrt.f32
59 %r = call fast <4 x float> @llvm.pow.v4f32(<4 x float> %x, <4 x float> <float 2.5e-1, float 2.5e-1, float 2.5e-01, float 2.5e-01>)
63 define <2 x double> @pow_v2f64_one_fourth_fmf(<2 x double> %x) nounwind {
64 ; ANY-LABEL: pow_v2f64_one_fourth_fmf:
67 ; HARDFLOAT: vsqrt.f64
68 ; HARDFLOAT: vsqrt.f64
69 ; HARDFLOAT: vsqrt.f64
70 ; HARDFLOAT: vsqrt.f64
71 %r = call fast <2 x double> @llvm.pow.v2f64(<2 x double> %x, <2 x double> <double 2.5e-1, double 2.5e-1>)
75 define float @pow_f32_one_fourth_not_enough_fmf(float %x) nounwind {
76 ; ANY-LABEL: pow_f32_one_fourth_not_enough_fmf:
79 %r = call afn ninf float @llvm.pow.f32(float %x, float 2.5e-01)
83 define double @pow_f64_one_fourth_not_enough_fmf(double %x) nounwind {
84 ; ANY-LABEL: pow_f64_one_fourth_not_enough_fmf:
87 %r = call nsz ninf double @llvm.pow.f64(double %x, double 2.5e-01)
91 define <4 x float> @pow_v4f32_one_fourth_not_enough_fmf(<4 x float> %x) nounwind {
92 ; ANY-LABEL: pow_v4f32_one_fourth_not_enough_fmf:
97 %r = call afn nsz <4 x float> @llvm.pow.v4f32(<4 x float> %x, <4 x float> <float 2.5e-1, float 2.5e-1, float 2.5e-01, float 2.5e-01>)
101 define <2 x double> @pow_v2f64_one_fourth_not_enough_fmf(<2 x double> %x) nounwind {
102 ; ANY-LABEL: pow_v2f64_one_fourth_not_enough_fmf:
105 %r = call nsz nnan reassoc <2 x double> @llvm.pow.v2f64(<2 x double> %x, <2 x double> <double 2.5e-1, double 2.5e-1>)