blob: 7886f29f5cef2b5c484a831e8bfcbf016b41c909 [file] [log] [blame]
Akira Hatanaka5c50a162013-06-11 22:21:44 +00001; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=32
Daniel Sanders1d3ae272014-04-14 16:00:28 +00002; RUN: llc -march=mips64el -mcpu=mips4 < %s | FileCheck %s -check-prefix=64
Akira Hatanaka5c50a162013-06-11 22:21:44 +00003; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s -check-prefix=64
4
Stephen Linf799e3f2013-07-13 20:38:47 +00005; 32-LABEL: test_sqrtf_float_:
Akira Hatanaka5c50a162013-06-11 22:21:44 +00006; 32: sqrt.s $f[[R0:[0-9]+]], $f{{[0-9]+}}
7; 32: c.un.s $f[[R0]], $f[[R0]]
Stephen Linf799e3f2013-07-13 20:38:47 +00008; 64-LABEL: test_sqrtf_float_:
Akira Hatanaka5c50a162013-06-11 22:21:44 +00009; 64: sqrt.s $f[[R0:[0-9]+]], $f{{[0-9]+}}
10; 64: c.un.s $f[[R0]], $f[[R0]]
11
12define float @test_sqrtf_float_(float %a) {
13entry:
14 %call = tail call float @sqrtf(float %a)
15 ret float %call
16}
17
18declare float @sqrtf(float)
19
Stephen Linf799e3f2013-07-13 20:38:47 +000020; 32-LABEL: test_sqrt_double_:
Akira Hatanaka5c50a162013-06-11 22:21:44 +000021; 32: sqrt.d $f[[R0:[0-9]+]], $f{{[0-9]+}}
22; 32: c.un.d $f[[R0]], $f[[R0]]
Stephen Linf799e3f2013-07-13 20:38:47 +000023; 64-LABEL: test_sqrt_double_:
Akira Hatanaka5c50a162013-06-11 22:21:44 +000024; 64: sqrt.d $f[[R0:[0-9]+]], $f{{[0-9]+}}
25; 64: c.un.d $f[[R0]], $f[[R0]]
26
27define double @test_sqrt_double_(double %a) {
28entry:
29 %call = tail call double @sqrt(double %a)
30 ret double %call
31}
32
33declare double @sqrt(double)