-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[RISCV] Added the MIPS prefetch extensions for MIPS RV64 P8700. #145647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8a1f988
Added prefetch extensions for MIPS RV64 P8700 and enable with xmipscb…
ukalappa-mips ff11413
Updated mcpu for mips-p8700 and related testcase for xmipscbop extens…
ukalappa-mips 96d7bde
Merge branch 'llvm:main' into ukalappa_xmipscbop
ukalappa-mips 7962538
Made the following changes like
ukalappa-mips b83fbc0
The following changes made to addressed the comments like
ukalappa-mips 49e4656
Merge branch 'main' into ukalappa_xmipscbop
ukalappa-mips 04aebba
Made the following changes
ukalappa-mips 60b7544
Merge branch 'main' into ukalappa_xmipscbop
ukalappa-mips File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,51 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 | ||
; RUN: llc -mtriple=riscv32 -mattr=+xmipscbop -mattr=+m -verify-machineinstrs < %s \ | ||
ukalappa-mips marked this conversation as resolved.
Show resolved
Hide resolved
|
||
; RUN: | FileCheck %s -check-prefix=RV32XMIPSPREFETCH | ||
; RUN: llc -mtriple=riscv64 -mattr=+xmipscbop -mattr=+m -verify-machineinstrs < %s \ | ||
; RUN: | FileCheck %s -check-prefix=RV64XMIPSPREFETCH | ||
|
||
define void @prefetch_data_read(ptr noundef %ptr) nounwind { | ||
; RV32XMIPSPREFETCH-LABEL: prefetch_data_read: | ||
; RV32XMIPSPREFETCH: # %bb.0: # %entry | ||
; RV32XMIPSPREFETCH-NEXT: mips.pref 8, 1(a0) | ||
; RV32XMIPSPREFETCH-NEXT: ret | ||
; | ||
; RV64XMIPSPREFETCH-LABEL: prefetch_data_read: | ||
; RV64XMIPSPREFETCH: # %bb.0: # %entry | ||
; RV64XMIPSPREFETCH-NEXT: mips.pref 8, 1(a0) | ||
; RV64XMIPSPREFETCH-NEXT: ret | ||
entry: | ||
%arrayidx = getelementptr inbounds nuw i8, ptr %ptr, i64 1 | ||
tail call void @llvm.prefetch.p0(ptr nonnull %arrayidx, i32 0, i32 0, i32 1) | ||
ret void | ||
ukalappa-mips marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
define void @prefetch_data_write(ptr noundef %ptr) nounwind { | ||
; RV32XMIPSPREFETCH-LABEL: prefetch_data_write: | ||
; RV32XMIPSPREFETCH: # %bb.0: | ||
; RV32XMIPSPREFETCH-NEXT: addi a0, a0, 512 | ||
; RV32XMIPSPREFETCH-NEXT: mips.pref 9, 0(a0) | ||
; RV32XMIPSPREFETCH-NEXT: ret | ||
; | ||
; RV64XMIPSPREFETCH-LABEL: prefetch_data_write: | ||
; RV64XMIPSPREFETCH: # %bb.0: | ||
; RV64XMIPSPREFETCH-NEXT: addi a0, a0, 512 | ||
; RV64XMIPSPREFETCH-NEXT: mips.pref 9, 0(a0) | ||
; RV64XMIPSPREFETCH-NEXT: ret | ||
%arrayidx = getelementptr inbounds nuw i8, ptr %ptr, i64 512 | ||
tail call void @llvm.prefetch.p0(ptr nonnull %arrayidx, i32 1, i32 0, i32 1) | ||
ret void | ||
} | ||
|
||
define void @prefetch_inst_read(ptr noundef %ptr) nounwind { | ||
; RV32XMIPSPREFETCH-LABEL: prefetch_inst_read: | ||
; RV32XMIPSPREFETCH: # %bb.0: | ||
; RV32XMIPSPREFETCH-NEXT: ret | ||
; | ||
; RV64XMIPSPREFETCH-LABEL: prefetch_inst_read: | ||
; RV64XMIPSPREFETCH: # %bb.0: | ||
; RV64XMIPSPREFETCH-NEXT: ret | ||
%arrayidx = getelementptr inbounds nuw i8, ptr %ptr, i64 512 | ||
tail call void @llvm.prefetch.p0(ptr nonnull %arrayidx, i32 0, i32 0, i32 0) | ||
ret void | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.