Guard fabs to bfc convert with V6T2 flag
[oota-llvm.git] / test / CodeGen / ARM / fabs-to-bfc.ll
diff --git a/test/CodeGen/ARM/fabs-to-bfc.ll b/test/CodeGen/ARM/fabs-to-bfc.ll
new file mode 100644 (file)
index 0000000..1a2e045
--- /dev/null
@@ -0,0 +1,14 @@
+; RUN: llc < %s -mtriple=armv5e-none-linux-gnueabi -mattr=+vfp2  | FileCheck %s -check-prefix=CHECK-VABS
+; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi  -mattr=+vfp3 | FileCheck  %s -check-prefix=CHECK-BFC
+
+
+define double @test(double %tx) {
+;CHECK-LABEL: test:
+  %call = tail call double @fabs(double %tx)
+  ret double %call
+;CHECK-VABS: vabs.f64
+;CHECK-BFC: bfc
+}
+
+declare double @fabs(double) readnone
+