• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=x86 -no-integrated-as < %s | FileCheck %s
2
3declare void @bar(i32* %junk)
4
5define i32 @foo(i1 %cond) {
6entry:
7  %r = alloca i32, align 128
8  store i32 -1, i32* %r, align 128
9  br i1 %cond, label %doit, label %skip
10
11doit:
12  call void asm sideeffect "xor %ecx, %ecx\0A\09mov %ecx, $0", "=*m,~{ecx},~{flags}"(i32* %r)
13  %junk = alloca i32
14  call void @bar(i32* %junk)
15  br label %skip
16
17skip:
18  %0 = load i32, i32* %r, align 128
19  ret i32 %0
20}
21
22; CHECK-LABEL: foo:
23; CHECK: pushl %ebp
24; CHECK: andl $-128, %esp
25; CHECK: xor %ecx, %ecx
26; CHECK-NEXT: mov %ecx, (%esi)
27; CHECK: movl (%esi), %eax
28; CHECK: popl %ebp
29; CHECK: ret
30