aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/MIR/X86/memory-operands.mir
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/MIR/X86/memory-operands.mir')
-rw-r--r--test/CodeGen/MIR/X86/memory-operands.mir30
1 files changed, 29 insertions, 1 deletions
diff --git a/test/CodeGen/MIR/X86/memory-operands.mir b/test/CodeGen/MIR/X86/memory-operands.mir
index 3c9463d2f313..a25538d9b1fc 100644
--- a/test/CodeGen/MIR/X86/memory-operands.mir
+++ b/test/CodeGen/MIR/X86/memory-operands.mir
@@ -1,4 +1,4 @@
-# RUN: llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s | FileCheck %s
+# RUN: llc -march=x86-64 -run-pass none -o - %s | FileCheck %s
# This test ensures that the MIR parser parses the machine memory operands
# correctly.
@@ -186,6 +186,9 @@
%0 = load i8*, i8** undef, align 8
ret i8* %0
}
+
+ define void @dummy0() { ret void }
+ define void @dummy1() { ret void }
...
---
name: test
@@ -506,3 +509,28 @@ body: |
%rax = MOV64rm undef %rax, 1, _, 0, _ :: (load 8 from `i8** undef`)
RETQ %rax
...
+---
+# Test memory operand without associated value.
+# CHECK-LABEL: name: dummy0
+# CHECK: %rax = MOV64rm undef %rax, 1, _, 0, _ :: (load 8)
+name: dummy0
+tracksRegLiveness: true
+body: |
+ bb.0:
+ %rax = MOV64rm undef %rax, 1, _, 0, _ :: (load 8)
+ RETQ %rax
+...
+---
+# Test parsing of stack references in machine memory operands.
+# CHECK-LABEL: name: dummy1
+# CHECK: %rax = MOV64rm %rsp, 1, _, 0, _ :: (load 8 from %stack.0)
+name: dummy1
+tracksRegLiveness: true
+stack:
+ - { id: 0, size: 4, alignment: 4 }
+body: |
+ bb.0:
+ %rax = MOV64rm %rsp, 1, _, 0, _ :: (load 8 from %stack.0)
+ RETQ %rax
+
+...