summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/vcmp-crash.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/ARM/vcmp-crash.ll')
-rw-r--r--test/CodeGen/ARM/vcmp-crash.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/vcmp-crash.ll b/test/CodeGen/ARM/vcmp-crash.ll
new file mode 100644
index 0000000000000..2d3262be5849b
--- /dev/null
+++ b/test/CodeGen/ARM/vcmp-crash.ll
@@ -0,0 +1,11 @@
+; RUN: llc -mcpu=cortex-m4 < %s | FileCheck %s
+
+target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
+target triple = "thumbv7em-none--eabi"
+
+; CHECK: vcmp.f32
+define double @f(double %a, double %b, double %c, float %d) {
+ %1 = fcmp oeq float %d, 0.0
+ %2 = select i1 %1, double %a, double %c
+ ret double %2
+}