1 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
2 target triple = "x86_64-pc-win32"
4 declare i64 @llvm.x86.flags.read.u64()
5 declare void @llvm.x86.flags.write.u64(i64)
7 define i64 @read_flags() {
9 %flags = call i64 @llvm.x86.flags.read.u64()
13 ; CHECK-LABEL: read_flags:
15 ; CHECK: .seh_pushreg %rbp
16 ; CHECK: movq %rsp, %rbp
17 ; CHECK: .seh_setframe %rbp, 0
18 ; CHECK: .seh_endprologue
20 ; CHECK-NEXT: popq %rax
21 ; CHECK-NEXT: popq %rbp
23 define void @write_flags(i64 %arg) {
25 call void @llvm.x86.flags.write.u64(i64 %arg)
29 ; CHECK-LABEL: write_flags:
31 ; CHECK: .seh_pushreg %rbp
32 ; CHECK: movq %rsp, %rbp
33 ; CHECK: .seh_setframe %rbp, 0
34 ; CHECK: .seh_endprologue
35 ; CHECK-NEXT: pushq %rcx
37 ; CHECK-NEXT: popq %rbp