1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=fsgsbase | FileCheck %s
4 define i32 @test_x86_rdfsbase_32() {
5 ; CHECK-LABEL: test_x86_rdfsbase_32:
7 ; CHECK-NEXT: rdfsbasel %eax
9 %res = call i32 @llvm.x86.rdfsbase.32()
12 declare i32 @llvm.x86.rdfsbase.32() nounwind readnone
14 define i32 @test_x86_rdgsbase_32() {
15 ; CHECK-LABEL: test_x86_rdgsbase_32:
17 ; CHECK-NEXT: rdgsbasel %eax
19 %res = call i32 @llvm.x86.rdgsbase.32()
22 declare i32 @llvm.x86.rdgsbase.32() nounwind readnone
24 define i64 @test_x86_rdfsbase_64() {
25 ; CHECK-LABEL: test_x86_rdfsbase_64:
27 ; CHECK-NEXT: rdfsbaseq %rax
29 %res = call i64 @llvm.x86.rdfsbase.64()
32 declare i64 @llvm.x86.rdfsbase.64() nounwind readnone
34 define i64 @test_x86_rdgsbase_64() {
35 ; CHECK-LABEL: test_x86_rdgsbase_64:
37 ; CHECK-NEXT: rdgsbaseq %rax
39 %res = call i64 @llvm.x86.rdgsbase.64()
42 declare i64 @llvm.x86.rdgsbase.64() nounwind readnone
44 define void @test_x86_wrfsbase_32(i32 %x) {
45 ; CHECK-LABEL: test_x86_wrfsbase_32:
47 ; CHECK-NEXT: wrfsbasel %edi
49 call void @llvm.x86.wrfsbase.32(i32 %x)
52 declare void @llvm.x86.wrfsbase.32(i32) nounwind readnone
54 define void @test_x86_wrgsbase_32(i32 %x) {
55 ; CHECK-LABEL: test_x86_wrgsbase_32:
57 ; CHECK-NEXT: wrgsbasel %edi
59 call void @llvm.x86.wrgsbase.32(i32 %x)
62 declare void @llvm.x86.wrgsbase.32(i32) nounwind readnone
64 define void @test_x86_wrfsbase_64(i64 %x) {
65 ; CHECK-LABEL: test_x86_wrfsbase_64:
67 ; CHECK-NEXT: wrfsbaseq %rdi
69 call void @llvm.x86.wrfsbase.64(i64 %x)
72 declare void @llvm.x86.wrfsbase.64(i64) nounwind readnone
74 define void @test_x86_wrgsbase_64(i64 %x) {
75 ; CHECK-LABEL: test_x86_wrgsbase_64:
77 ; CHECK-NEXT: wrgsbaseq %rdi
79 call void @llvm.x86.wrgsbase.64(i64 %x)
82 declare void @llvm.x86.wrgsbase.64(i64) nounwind readnone