• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3
4define i32 @test_x86_rdfsbase_32() {
5; CHECK-LABEL: test_x86_rdfsbase_32:
6; CHECK:       # %bb.0:
7; CHECK-NEXT:    rdfsbasel %eax
8; CHECK-NEXT:    retq
9  %res = call i32 @llvm.x86.rdfsbase.32()
10  ret i32 %res
11}
12declare i32 @llvm.x86.rdfsbase.32() nounwind readnone
13
14define i32 @test_x86_rdgsbase_32() {
15; CHECK-LABEL: test_x86_rdgsbase_32:
16; CHECK:       # %bb.0:
17; CHECK-NEXT:    rdgsbasel %eax
18; CHECK-NEXT:    retq
19  %res = call i32 @llvm.x86.rdgsbase.32()
20  ret i32 %res
21}
22declare i32 @llvm.x86.rdgsbase.32() nounwind readnone
23
24define i64 @test_x86_rdfsbase_64() {
25; CHECK-LABEL: test_x86_rdfsbase_64:
26; CHECK:       # %bb.0:
27; CHECK-NEXT:    rdfsbaseq %rax
28; CHECK-NEXT:    retq
29  %res = call i64 @llvm.x86.rdfsbase.64()
30  ret i64 %res
31}
32declare i64 @llvm.x86.rdfsbase.64() nounwind readnone
33
34define i64 @test_x86_rdgsbase_64() {
35; CHECK-LABEL: test_x86_rdgsbase_64:
36; CHECK:       # %bb.0:
37; CHECK-NEXT:    rdgsbaseq %rax
38; CHECK-NEXT:    retq
39  %res = call i64 @llvm.x86.rdgsbase.64()
40  ret i64 %res
41}
42declare i64 @llvm.x86.rdgsbase.64() nounwind readnone
43
44define void @test_x86_wrfsbase_32(i32 %x) {
45; CHECK-LABEL: test_x86_wrfsbase_32:
46; CHECK:       # %bb.0:
47; CHECK-NEXT:    wrfsbasel %edi
48; CHECK-NEXT:    retq
49  call void @llvm.x86.wrfsbase.32(i32 %x)
50  ret void
51}
52declare void @llvm.x86.wrfsbase.32(i32) nounwind readnone
53
54define void @test_x86_wrgsbase_32(i32 %x) {
55; CHECK-LABEL: test_x86_wrgsbase_32:
56; CHECK:       # %bb.0:
57; CHECK-NEXT:    wrgsbasel %edi
58; CHECK-NEXT:    retq
59  call void @llvm.x86.wrgsbase.32(i32 %x)
60  ret void
61}
62declare void @llvm.x86.wrgsbase.32(i32) nounwind readnone
63
64define void @test_x86_wrfsbase_64(i64 %x) {
65; CHECK-LABEL: test_x86_wrfsbase_64:
66; CHECK:       # %bb.0:
67; CHECK-NEXT:    wrfsbaseq %rdi
68; CHECK-NEXT:    retq
69  call void @llvm.x86.wrfsbase.64(i64 %x)
70  ret void
71}
72declare void @llvm.x86.wrfsbase.64(i64) nounwind readnone
73
74define void @test_x86_wrgsbase_64(i64 %x) {
75; CHECK-LABEL: test_x86_wrgsbase_64:
76; CHECK:       # %bb.0:
77; CHECK-NEXT:    wrgsbaseq %rdi
78; CHECK-NEXT:    retq
79  call void @llvm.x86.wrgsbase.64(i64 %x)
80  ret void
81}
82declare void @llvm.x86.wrgsbase.64(i64) nounwind readnone
83