1 # RUN: llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s | FileCheck %s
2 # This test ensures that the MIR parser parses global value operands correctly.
6 @G = external global i32
7 @0 = external global i32
11 %a = load i32, i32* @G
18 %a = load i32, i32* @0
23 @.$0 = external global i32
24 @-_- = external global i32
25 @_-_a = external global i32
26 @$.-B = external global i32
30 %a = load i32, i32* @.$0
31 store i32 %a, i32* @-_-
32 %b = load i32, i32* @_-_a
33 store i32 %b, i32* @$.-B
45 # CHECK: - '%rax = MOV64rm %rip, 1, _, @G, _'
46 - '%rax = MOV64rm %rip, 1, _, @G, _'
47 - '%eax = MOV32rm %rax, 1, _, 0, _'
48 - '%eax = INC32r %eax, implicit-def %eflags'
58 # CHECK: - '%rax = MOV64rm %rip, 1, _, @0, _'
59 - '%rax = MOV64rm %rip, 1, _, @0, _'
60 - '%eax = MOV32rm %rax, 1, _, 0, _'
61 - '%eax = INC32r %eax, implicit-def %eflags'
74 - '%rax = MOV64rm %rip, 1, _, @.$0, _'
75 - '%eax = MOV32rm killed %rax, 1, _, 0, _'
76 - '%rcx = MOV64rm %rip, 1, _, @-_-, _'
77 - 'MOV32mr killed %rcx, 1, _, 0, _, killed %eax'
78 - '%rax = MOV64rm %rip, 1, _, @_-_a, _'
79 - '%eax = MOV32rm killed %rax, 1, _, 0, _'
80 - '%rcx = MOV64rm %rip, 1, _, @$.-B, _'
81 - 'MOV32mr killed %rcx, 1, _, 0, _, %eax'