1 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+xsave | FileCheck %s 2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+xsave | FileCheck %s --check-prefix=CHECK64 3 4 define i64 @test_xgetbv(i32 %in) { 5 ; CHECK-LABEL: test_xgetbv 6 ; CHECK: movl 4(%esp), %ecx 7 ; CHECK: xgetbv 8 ; CHECK: ret 9 10 ; CHECK64-LABEL: test_xgetbv 11 ; CHECK64: movl %edi, %ecx 12 ; CHECK64: xgetbv 13 ; CHECK64: shlq $32, %rdx 14 ; CHECK64: orq %rdx, %rax 15 ; CHECK64: ret 16 17 %1 = call i64 @llvm.x86.xgetbv(i32 %in) 18 ret i64 %1; 19 } 20 21 declare i64 @llvm.x86.xgetbv(i32) 22