blob: fa897bf83f3a4ce60bd1163b120c6461921576d7 [file] [log] [blame]
Dan Gohmanfce288f2009-09-09 00:09:15 +00001; RUN: llc < %s -march=arm | \
Dan Gohman28beeea2007-08-15 13:36:28 +00002; RUN: grep {mov r0, #0} | count 1
Dan Gohmanfce288f2009-09-09 00:09:15 +00003; RUN: llc < %s -march=arm -mattr=+vfp2 | \
Dan Gohman28beeea2007-08-15 13:36:28 +00004; RUN: grep {flds.*\\\[} | count 1
Dan Gohmanfce288f2009-09-09 00:09:15 +00005; RUN: llc < %s -march=arm -mattr=+vfp2 | \
Dan Gohman28beeea2007-08-15 13:36:28 +00006; RUN: grep {fsts.*\\\[} | count 1
Rafael Espindola32bd5f42006-10-17 18:04:53 +00007
Tanya Lattner6263f942008-02-17 20:02:20 +00008define float @f1(float %a) {
9 ret float 0.000000e+00
Rafael Espindola32bd5f42006-10-17 18:04:53 +000010}
11
Tanya Lattner6263f942008-02-17 20:02:20 +000012define float @f2(float* %v, float %u) {
13 %tmp = load float* %v ; <float> [#uses=1]
Dan Gohmanae3a0be2009-06-04 22:49:04 +000014 %tmp1 = fadd float %tmp, %u ; <float> [#uses=1]
Tanya Lattner6263f942008-02-17 20:02:20 +000015 ret float %tmp1
Rafael Espindola32bd5f42006-10-17 18:04:53 +000016}
Rafael Espindola3f3a6f62006-10-17 18:29:14 +000017
Tanya Lattner6263f942008-02-17 20:02:20 +000018define void @f3(float %a, float %b, float* %v) {
Dan Gohmanae3a0be2009-06-04 22:49:04 +000019 %tmp = fadd float %a, %b ; <float> [#uses=1]
Tanya Lattner6263f942008-02-17 20:02:20 +000020 store float %tmp, float* %v
21 ret void
Rafael Espindola3f3a6f62006-10-17 18:29:14 +000022}