blob: 8b71dc42344c1fe3bdd93131957141724c9c026b [file] [log] [blame]
Akira Hatanaka45137f92013-06-11 22:21:44 +00001; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=32
2; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s -check-prefix=64
3
Stephen Linb4dc0232013-07-13 20:38:47 +00004; 32-LABEL: test_sqrtf_float_:
Akira Hatanaka45137f92013-06-11 22:21:44 +00005; 32: sqrt.s $f[[R0:[0-9]+]], $f{{[0-9]+}}
6; 32: c.un.s $f[[R0]], $f[[R0]]
Stephen Linb4dc0232013-07-13 20:38:47 +00007; 64-LABEL: test_sqrtf_float_:
Akira Hatanaka45137f92013-06-11 22:21:44 +00008; 64: sqrt.s $f[[R0:[0-9]+]], $f{{[0-9]+}}
9; 64: c.un.s $f[[R0]], $f[[R0]]
10
11define float @test_sqrtf_float_(float %a) {
12entry:
13 %call = tail call float @sqrtf(float %a)
14 ret float %call
15}
16
17declare float @sqrtf(float)
18
Stephen Linb4dc0232013-07-13 20:38:47 +000019; 32-LABEL: test_sqrt_double_:
Akira Hatanaka45137f92013-06-11 22:21:44 +000020; 32: sqrt.d $f[[R0:[0-9]+]], $f{{[0-9]+}}
21; 32: c.un.d $f[[R0]], $f[[R0]]
Stephen Linb4dc0232013-07-13 20:38:47 +000022; 64-LABEL: test_sqrt_double_:
Akira Hatanaka45137f92013-06-11 22:21:44 +000023; 64: sqrt.d $f[[R0:[0-9]+]], $f{{[0-9]+}}
24; 64: c.un.d $f[[R0]], $f[[R0]]
25
26define double @test_sqrt_double_(double %a) {
27entry:
28 %call = tail call double @sqrt(double %a)
29 ret double %call
30}
31
32declare double @sqrt(double)