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