1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/CodeGen/X86/system-intrinsics-xgetbv.ll
Francis Visoiu Mistrih cd4ff3e8fc [CodeGen] Always use printReg to print registers in both MIR and debug
output

As part of the unification of the debug format and the MIR format,
always use `printReg` to print all kinds of registers.

Updated the tests using '_' instead of '%noreg' until we decide which
one we want to be the default one.

Differential Revision: https://reviews.llvm.org/D40421

llvm-svn: 319445
2017-11-30 16:12:24 +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)