summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/ARM/unsafe-fsub.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/ARM/unsafe-fsub.ll')
-rw-r--r--test/CodeGen/ARM/unsafe-fsub.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/unsafe-fsub.ll b/test/CodeGen/ARM/unsafe-fsub.ll
new file mode 100644
index 0000000..3a4477d
--- /dev/null
+++ b/test/CodeGen/ARM/unsafe-fsub.ll
@@ -0,0 +1,18 @@
+; RUN: llc -march=arm -mcpu=cortex-a9 < %s | FileCheck -check-prefix=SAFE %s
+; RUN: llc -march=arm -mcpu=cortex-a9 -enable-unsafe-fp-math < %s | FileCheck -check-prefix=FAST %s
+
+target triple = "armv7-apple-ios"
+
+; SAFE: test
+; FAST: test
+define float @test(float %x, float %y) {
+entry:
+; SAFE: vmul.f32
+; SAFE: vsub.f32
+; FAST: mov r0, #0
+ %0 = fmul float %x, %y
+ %1 = fsub float %0, %0
+ ret float %1
+}
+
+
OpenPOWER on IntegriCloud