diff options
Diffstat (limited to 'llvm/test/CodeGen/MIR')
-rw-r--r-- | llvm/test/CodeGen/MIR/X86/global-value-operands.mir | 19 | ||||
-rw-r--r-- | llvm/test/CodeGen/MIR/X86/missing-closing-quote.mir | 24 |
2 files changed, 43 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/MIR/X86/global-value-operands.mir b/llvm/test/CodeGen/MIR/X86/global-value-operands.mir index 3e4710d33f4..775a01ba003 100644 --- a/llvm/test/CodeGen/MIR/X86/global-value-operands.mir +++ b/llvm/test/CodeGen/MIR/X86/global-value-operands.mir @@ -34,6 +34,14 @@ ret i32 %b } + @"\01Hello@$%09 \\ World," = external global i32 + + define i32 @test2() { + entry: + %a = load i32, i32* @"\01Hello@$%09 \\ World," + ret i32 %a + } + ... --- # CHECK: name: inc @@ -81,3 +89,14 @@ body: - 'MOV32mr killed %rcx, 1, _, 0, _, %eax' - 'RETQ %eax' ... +--- +name: test2 +body: + - id: 0 + name: entry + instructions: + # CHECK: , @"\01Hello@$%09 \5C World,", + - '%rax = MOV64rm %rip, 1, _, @"\01Hello@$%09 \\ World,", _' + - '%eax = MOV32rm killed %rax, 1, _, 0, _' + - 'RETQ %eax' +... diff --git a/llvm/test/CodeGen/MIR/X86/missing-closing-quote.mir b/llvm/test/CodeGen/MIR/X86/missing-closing-quote.mir new file mode 100644 index 00000000000..f188d3ad8cf --- /dev/null +++ b/llvm/test/CodeGen/MIR/X86/missing-closing-quote.mir @@ -0,0 +1,24 @@ +# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s + +--- | + + @"quoted name" = external global i32 + + define i32 @test() { + entry: + %a = load i32, i32* @"quoted name" + ret i32 %a + } + +... +--- +name: test +body: + - id: 0 + name: entry + instructions: + # CHECK: [[@LINE+1]]:53: end of machine instruction reached before the closing '"' + - '%rax = MOV64rm %rip, 1, _, @"quoted name, _' + - '%eax = MOV32rm killed %rax, 1, _, 0, _' + - 'RETQ %eax' +... |