-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VE] Support STACKSAVE and STACKRESTORE
Change to use default expanded code. Add regression tests also. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D93539
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
; RUN: llc < %s -mtriple=ve | FileCheck %s | ||
|
||
; Function Attrs: noinline nounwind optnone | ||
define i8* @stacksave() { | ||
; CHECK-LABEL: stacksave: | ||
; CHECK: .LBB{{[0-9]+}}_2: | ||
; CHECK-NEXT: or %s0, 0, %s11 | ||
; CHECK-NEXT: or %s11, 0, %s9 | ||
%ret = call i8* @llvm.stacksave() | ||
ret i8* %ret | ||
} | ||
|
||
; Function Attrs: noinline nounwind optnone | ||
define void @stackrestore(i8* %ptr) { | ||
; CHECK-LABEL: stackrestore: | ||
; CHECK: .LBB{{[0-9]+}}_2: | ||
; CHECK-NEXT: or %s11, 0, %s0 | ||
; CHECK-NEXT: or %s11, 0, %s9 | ||
call void @llvm.stackrestore(i8* %ptr) | ||
ret void | ||
} | ||
|
||
; Function Attrs: nounwind | ||
declare i8* @llvm.stacksave() | ||
; Function Attrs: nounwind | ||
declare void @llvm.stackrestore(i8*) |