diff options
author | Matthias Braun <matze@braunis.de> | 2016-06-04 00:06:31 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-06-04 00:06:31 +0000 |
commit | 6cf1b930a728290654369e7873d3c82dbf4223d2 (patch) | |
tree | 00ed98f8c874385732cd587dc3ffb783364792aa /test | |
parent | 670f8e5ba8c30c971de6daa21b50e93d99869d38 (diff) |
MIR: Support MachineMemOperands without associated value
This is allowed (though used rarely) and useful to keep your tests
short.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271752 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/MIR/X86/expected-from-in-memory-operand.mir | 24 | ||||
-rw-r--r-- | test/CodeGen/MIR/X86/memory-operands.mir | 15 |
2 files changed, 15 insertions, 24 deletions
diff --git a/test/CodeGen/MIR/X86/expected-from-in-memory-operand.mir b/test/CodeGen/MIR/X86/expected-from-in-memory-operand.mir deleted file mode 100644 index f9e9d0b2296..00000000000 --- a/test/CodeGen/MIR/X86/expected-from-in-memory-operand.mir +++ /dev/null @@ -1,24 +0,0 @@ -# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s - ---- | - - define i32 @test(i32* %a) { - entry: - %b = load i32, i32* %a - ret i32 %b - } - -... ---- -name: test -tracksRegLiveness: true -liveins: - - { reg: '%rdi' } -body: | - bb.0.entry: - liveins: %rdi - ; CHECK: [[@LINE+1]]:55: expected 'from' - %eax = MOV32rm killed %rdi, 1, _, 0, _ :: (load 4 %ir.a) - RETQ %eax -... - diff --git a/test/CodeGen/MIR/X86/memory-operands.mir b/test/CodeGen/MIR/X86/memory-operands.mir index 1f295df7551..0cf74ddbe70 100644 --- a/test/CodeGen/MIR/X86/memory-operands.mir +++ b/test/CodeGen/MIR/X86/memory-operands.mir @@ -186,6 +186,10 @@ %0 = load i8*, i8** undef, align 8 ret i8* %0 } + + define void @dummy() { + ret void + } ... --- name: test @@ -506,3 +510,14 @@ body: | %rax = MOV64rm undef %rax, 1, _, 0, _ :: (load 8 from `i8** undef`) RETQ %rax ... +--- +# Test memory operand without associated value. +# CHECK-LABEL: name: dummy +# CHECK: %rax = MOV64rm undef %rax, 1, _, 0, _ :: (load 8) +name: dummy +tracksRegLiveness: true +body: | + bb.0: + %rax = MOV64rm undef %rax, 1, _, 0, _ :: (load 8) + RETQ %rax +... |