linux-packaging-mono/external/llvm/test/CodeGen/X86/system-intrinsics-xgetbv.ll
Xamarin Public Jenkins (auto-signing) 8625704ad8 Imported Upstream version 5.18.0.179
Former-commit-id: 67aa10e65b237e1c4537630979ee99ebe1374215
2018-10-25 08:34:57 +00:00

22 lines
536 B
LLVM

; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+xsave | FileCheck %s
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+xsave | FileCheck %s --check-prefix=CHECK64
define i64 @test_xgetbv(i32 %in) {
; CHECK-LABEL: test_xgetbv
; CHECK: movl 4(%esp), %ecx
; CHECK: xgetbv
; CHECK: ret
; CHECK64-LABEL: test_xgetbv
; CHECK64: movl %edi, %ecx
; CHECK64: xgetbv
; CHECK64: shlq $32, %rdx
; CHECK64: orq %rdx, %rax
; CHECK64: ret
%1 = call i64 @llvm.x86.xgetbv(i32 %in)
ret i64 %1;
}
declare i64 @llvm.x86.xgetbv(i32)