summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/MIR
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-08-06 23:57:04 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-08-06 23:57:04 +0000
commitcba8c5fe317bcad85d0bebb7aa68e52353f54916 (patch)
treee196c5ac32784567b6d73027e24e218d6b349e97 /llvm/test/CodeGen/MIR
parent4c1ff05a705c55d30a8b9a12d9835362966ae4fe (diff)
downloadbcm5719-llvm-cba8c5fe317bcad85d0bebb7aa68e52353f54916.tar.gz
bcm5719-llvm-cba8c5fe317bcad85d0bebb7aa68e52353f54916.zip
MIR Serialization: Fix serialization of unnamed IR block references.
The block address machine operands can reference IR blocks in other functions. This commit fixes a bug where the references to unnamed IR blocks in other functions weren't serialized correctly. llvm-svn: 244299
Diffstat (limited to 'llvm/test/CodeGen/MIR')
-rw-r--r--llvm/test/CodeGen/MIR/X86/block-address-operands.mir23
1 files changed, 22 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/MIR/X86/block-address-operands.mir b/llvm/test/CodeGen/MIR/X86/block-address-operands.mir
index c96720d3559..67e298e4932 100644
--- a/llvm/test/CodeGen/MIR/X86/block-address-operands.mir
+++ b/llvm/test/CodeGen/MIR/X86/block-address-operands.mir
@@ -26,6 +26,12 @@
ret void
}
+ define void @slot_in_other_function(i8** %addr) {
+ entry:
+ store volatile i8* blockaddress(@test3, %0), i8** %addr
+ ret void
+ }
+
define void @test3() {
entry:
store volatile i8* blockaddress(@test3, %0), i8** @addr
@@ -81,6 +87,20 @@ body:
- RETQ
...
---
+name: slot_in_other_function
+tracksRegLiveness: true
+body:
+ - id: 0
+ name: entry
+ liveins: [ '%rdi' ]
+ instructions:
+# CHECK: name: slot_in_other_function
+# CHECK: %rax = LEA64r %rip, 1, _, blockaddress(@test3, %ir-block.0), _
+ - '%rax = LEA64r %rip, 1, _, blockaddress(@test3, %ir-block.0), _'
+ - 'MOV64mr killed %rdi, 1, _, 0, _, killed %rax'
+ - RETQ
+...
+---
name: test3
tracksRegLiveness: true
body:
@@ -88,7 +108,8 @@ body:
name: entry
successors: [ '%bb.1' ]
instructions:
- # CHECK: %rax = LEA64r %rip, 1, _, blockaddress(@test3, %ir-block.0), _
+# CHECK: name: test3
+# CHECK: %rax = LEA64r %rip, 1, _, blockaddress(@test3, %ir-block.0), _
- '%rax = LEA64r %rip, 1, _, blockaddress(@test3, %ir-block.0), _'
- 'MOV64mr %rip, 1, _, @addr, _, killed %rax'
- 'JMP64m %rip, 1, _, @addr, _'
OpenPOWER on IntegriCloud