1 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
2 target triple = "i686-pc-win32"
4 declare i32 @llvm.x86.flags.read.u32()
5 declare void @llvm.x86.flags.write.u32(i32)
7 define i32 @read_flags() {
9 %flags = call i32 @llvm.x86.flags.read.u32()
13 ; CHECK-LABEL: _read_flags:
15 ; CHECK-NEXT: movl %esp, %ebp
17 ; CHECK-NEXT: popl %eax
18 ; CHECK-NEXT: popl %ebp
20 define x86_fastcallcc void @write_flags(i32 inreg %arg) {
22 call void @llvm.x86.flags.write.u32(i32 %arg)
26 ; CHECK-LABEL: @write_flags@4:
28 ; CHECK-NEXT: movl %esp, %ebp
29 ; CHECK-NEXT: pushl %ecx
31 ; CHECK-NEXT: popl %ebp