Skip to content

Commit bc4347a

Browse files
author
Yuanke Luo
committed
Address Phoebe's comments
1 parent a30ecbc commit bc4347a

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

llvm/test/CodeGen/X86/early-clobber.mir

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
# RUN: llc -mtriple=i386-unknown-linux-gnu -start-before=twoaddressinstruction -verify-machineinstrs -o - %s
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
2+
# RUN: llc -mtriple=i386-unknown-linux-gnu -start-before=twoaddressinstruction -stop-after=postrapseudos -verify-machineinstrs -o - %s | FileCheck %s
23

34
# Test register live range that is split from rematerializing. The live range should
45
# start with Slot_EarlyClobber instead of Slot_Register. Machineverifer can check it.
56

67
--- |
7-
target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128"
8-
target triple = "i386-unknown-linux-gnu"
9-
108
@g = external constant [2 x i32], align 4
119

1210
; Function Attrs: nounwind
@@ -49,6 +47,35 @@ fixedStack:
4947
- { id: 0, size: 4, alignment: 16, isImmutable: true }
5048
machineFunctionInfo: {}
5149
body: |
50+
; CHECK-LABEL: name: test
51+
; CHECK: bb.0.entry:
52+
; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
53+
; CHECK-NEXT: liveins: $ebp, $ebx, $edi, $esi
54+
; CHECK-NEXT: {{ $}}
55+
; CHECK-NEXT: frame-setup PUSH32r killed $ebp, implicit-def $esp, implicit $esp
56+
; CHECK-NEXT: frame-setup PUSH32r killed $ebx, implicit-def $esp, implicit $esp
57+
; CHECK-NEXT: frame-setup PUSH32r killed $edi, implicit-def $esp, implicit $esp
58+
; CHECK-NEXT: frame-setup PUSH32r killed $esi, implicit-def $esp, implicit $esp
59+
; CHECK-NEXT: $esp = frame-setup SUB32ri $esp, 12, implicit-def dead $eflags
60+
; CHECK-NEXT: INLINEASM &"", 1 /* sideeffect attdialect */, 12 /* clobber */, implicit-def dead early-clobber $ebp, 12 /* clobber */, implicit-def dead early-clobber $eax, 12 /* clobber */, implicit-def dead early-clobber $ebx, 12 /* clobber */, implicit-def dead early-clobber $ecx, 12 /* clobber */, implicit-def dead early-clobber $edx, 12 /* clobber */, implicit-def dead early-clobber $esi, 12 /* clobber */, implicit-def dead early-clobber $edi, 12 /* clobber */, implicit-def dead early-clobber $df, 12 /* clobber */, implicit-def early-clobber $fpsw, 12 /* clobber */, implicit-def dead early-clobber $eflags
61+
; CHECK-NEXT: early-clobber renamable $eax = XOR32rr undef $eax, undef $eax, implicit-def dead $eflags
62+
; CHECK-NEXT: TEST8rr renamable $al, renamable $al, implicit-def $eflags
63+
; CHECK-NEXT: JCC_1 %bb.2, 5, implicit $eflags
64+
; CHECK-NEXT: {{ $}}
65+
; CHECK-NEXT: bb.1.if:
66+
; CHECK-NEXT: successors: %bb.2(0x80000000)
67+
; CHECK-NEXT: {{ $}}
68+
; CHECK-NEXT: renamable $eax = MOV32ri 1
69+
; CHECK-NEXT: {{ $}}
70+
; CHECK-NEXT: bb.2.exit:
71+
; CHECK-NEXT: liveins: $eax
72+
; CHECK-NEXT: {{ $}}
73+
; CHECK-NEXT: $esp = frame-destroy ADD32ri $esp, 12, implicit-def dead $eflags
74+
; CHECK-NEXT: $esi = frame-destroy POP32r implicit-def $esp, implicit $esp
75+
; CHECK-NEXT: $edi = frame-destroy POP32r implicit-def $esp, implicit $esp
76+
; CHECK-NEXT: $ebx = frame-destroy POP32r implicit-def $esp, implicit $esp
77+
; CHECK-NEXT: $ebp = frame-destroy POP32r implicit-def $esp, implicit $esp
78+
; CHECK-NEXT: RET 0, $eax
5279
bb.0.entry:
5380
successors: %bb.1, %bb.2
5481

0 commit comments

Comments
 (0)