summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM64/fast-isel-materialize.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/ARM64/fast-isel-materialize.ll')
-rw-r--r--test/CodeGen/ARM64/fast-isel-materialize.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/CodeGen/ARM64/fast-isel-materialize.ll b/test/CodeGen/ARM64/fast-isel-materialize.ll
new file mode 100644
index 0000000000..fa2daf73db
--- /dev/null
+++ b/test/CodeGen/ARM64/fast-isel-materialize.ll
@@ -0,0 +1,27 @@
+; RUN: llc < %s -O0 -fast-isel-abort -mtriple=arm64-apple-darwin | FileCheck %s
+
+; Materialize using fmov
+define void @float_(float* %value) {
+; CHECK: @float_
+; CHECK: fmov s0, #1.250000e+00
+ store float 1.250000e+00, float* %value, align 4
+ ret void
+}
+
+define void @double_(double* %value) {
+; CHECK: @double_
+; CHECK: fmov d0, #1.250000e+00
+ store double 1.250000e+00, double* %value, align 8
+ ret void
+}
+
+; Materialize from constant pool
+define float @float_cp() {
+; CHECK: @float_cp
+ ret float 0x400921FB60000000
+}
+
+define double @double_cp() {
+; CHECK: @double_cp
+ ret double 0x400921FB54442D18
+}