2017-11-26 21:02:45 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+shstk -mattr=+ibt | FileCheck %s
|
|
|
|
|
|
|
|
define void @test_incsspd(i32 %a) local_unnamed_addr {
|
|
|
|
; CHECK-LABEL: test_incsspd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0: ## %entry
|
2017-11-26 21:02:45 +08:00
|
|
|
; CHECK-NEXT: incsspd %edi
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
entry:
|
|
|
|
tail call void @llvm.x86.incsspd(i32 %a)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.incsspd(i32)
|
|
|
|
|
|
|
|
define void @test_incsspq(i32 %a) local_unnamed_addr {
|
|
|
|
; CHECK-LABEL: test_incsspq:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0: ## %entry
|
2017-11-26 21:02:45 +08:00
|
|
|
; CHECK-NEXT: movslq %edi, %rax
|
|
|
|
; CHECK-NEXT: incsspq %rax
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
entry:
|
|
|
|
%conv.i = sext i32 %a to i64
|
|
|
|
tail call void @llvm.x86.incsspq(i64 %conv.i)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.incsspq(i64)
|
|
|
|
|
|
|
|
define i32 @test_rdsspd(i32 %a) {
|
|
|
|
; CHECK-LABEL: test_rdsspd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0: ## %entry
|
2017-11-26 21:02:45 +08:00
|
|
|
; CHECK-NEXT: rdsspd %edi
|
|
|
|
; CHECK-NEXT: movl %edi, %eax
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
entry:
|
|
|
|
%0 = call i32 @llvm.x86.rdsspd(i32 %a)
|
|
|
|
ret i32 %0
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i32 @llvm.x86.rdsspd(i32)
|
|
|
|
|
|
|
|
define i64 @test_rdsspq(i64 %a) {
|
|
|
|
; CHECK-LABEL: test_rdsspq:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0: ## %entry
|
2017-11-26 21:02:45 +08:00
|
|
|
; CHECK-NEXT: rdsspq %rdi
|
|
|
|
; CHECK-NEXT: movq %rdi, %rax
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
entry:
|
|
|
|
%0 = call i64 @llvm.x86.rdsspq(i64 %a)
|
|
|
|
ret i64 %0
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i64 @llvm.x86.rdsspq(i64)
|
|
|
|
|
|
|
|
define void @test_saveprevssp() {
|
|
|
|
; CHECK-LABEL: test_saveprevssp:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0: ## %entry
|
2017-11-26 21:02:45 +08:00
|
|
|
; CHECK-NEXT: saveprevssp
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
entry:
|
|
|
|
tail call void @llvm.x86.saveprevssp()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.saveprevssp()
|
|
|
|
|
|
|
|
define void @test_rstorssp(i8* %__p) {
|
|
|
|
; CHECK-LABEL: test_rstorssp:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0: ## %entry
|
2017-11-26 21:02:45 +08:00
|
|
|
; CHECK-NEXT: rstorssp (%rdi)
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
entry:
|
|
|
|
tail call void @llvm.x86.rstorssp(i8* %__p)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.rstorssp(i8*)
|
|
|
|
|
|
|
|
define void @test_wrssd(i32 %a, i8* %__p) {
|
|
|
|
; CHECK-LABEL: test_wrssd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0: ## %entry
|
2017-11-26 21:02:45 +08:00
|
|
|
; CHECK-NEXT: wrssd %edi, (%rsi)
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
entry:
|
|
|
|
tail call void @llvm.x86.wrssd(i32 %a, i8* %__p)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.wrssd(i32, i8*)
|
|
|
|
|
|
|
|
define void @test_wrssq(i64 %a, i8* %__p) {
|
|
|
|
; CHECK-LABEL: test_wrssq:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0: ## %entry
|
2017-11-26 21:02:45 +08:00
|
|
|
; CHECK-NEXT: wrssq %rdi, (%rsi)
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
entry:
|
|
|
|
tail call void @llvm.x86.wrssq(i64 %a, i8* %__p)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.wrssq(i64, i8*)
|
|
|
|
|
|
|
|
define void @test_wrussd(i32 %a, i8* %__p) {
|
|
|
|
; CHECK-LABEL: test_wrussd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0: ## %entry
|
2017-11-26 21:02:45 +08:00
|
|
|
; CHECK-NEXT: wrussd %edi, (%rsi)
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
entry:
|
|
|
|
tail call void @llvm.x86.wrussd(i32 %a, i8* %__p)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.wrussd(i32, i8*)
|
|
|
|
|
|
|
|
define void @test_wrussq(i64 %a, i8* %__p) {
|
|
|
|
; CHECK-LABEL: test_wrussq:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0: ## %entry
|
2017-11-26 21:02:45 +08:00
|
|
|
; CHECK-NEXT: wrussq %rdi, (%rsi)
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
entry:
|
|
|
|
tail call void @llvm.x86.wrussq(i64 %a, i8* %__p)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.wrussq(i64, i8*)
|
|
|
|
|
|
|
|
define void @test_setssbsy() {
|
|
|
|
; CHECK-LABEL: test_setssbsy:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0: ## %entry
|
2017-11-26 21:02:45 +08:00
|
|
|
; CHECK-NEXT: setssbsy
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
entry:
|
|
|
|
tail call void @llvm.x86.setssbsy()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.setssbsy()
|
|
|
|
|
|
|
|
define void @test_clrssbsy(i8* %__p) {
|
|
|
|
; CHECK-LABEL: test_clrssbsy:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0: ## %entry
|
2017-11-26 21:02:45 +08:00
|
|
|
; CHECK-NEXT: clrssbsy (%rdi)
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
entry:
|
|
|
|
tail call void @llvm.x86.clrssbsy(i8* %__p)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.clrssbsy(i8* %__p)
|