-
Notifications
You must be signed in to change notification settings - Fork 14.5k
[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
Changes from 6 commits
8a1f988
ff11413
96d7bde
7962538
b83fbc0
49e4656
04aebba
60b7544
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2807,6 +2807,9 @@ bool RISCVInstrInfo::verifyInstruction(const MachineInstr &MI, | |
case RISCVOp::OPERAND_UIMM9_LSB000: | ||
Ok = isShiftedUInt<6, 3>(Imm); | ||
break; | ||
case RISCVOp::OPERAND_UIMM9: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is still unresolved There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. takencare ..thank you @topperc for the pointers.. |
||
Ok = isUInt<9>(Imm); | ||
break; | ||
case RISCVOp::OPERAND_SIMM10_LSB0000_NONZERO: | ||
Ok = isShiftedInt<6, 4>(Imm) && (Imm != 0); | ||
break; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
; 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_read(ptr noundef %ptr) nounwind { | ||
; RV32XMIPSPREFETCH-LABEL: prefetch_read: | ||
; RV32XMIPSPREFETCH: # %bb.0: # %entry | ||
; RV32XMIPSPREFETCH-NEXT: mips.pref 8, 1(a0) | ||
; RV32XMIPSPREFETCH-NEXT: ret | ||
; | ||
; RV64XMIPSPREFETCH-LABEL: prefetch_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_write(ptr noundef %ptr) nounwind { | ||
; RV32XMIPSPREFETCH-LABEL: prefetch_write: | ||
; RV32XMIPSPREFETCH: # %bb.0: | ||
; RV32XMIPSPREFETCH-NEXT: addi a0, a0, 512 | ||
; RV32XMIPSPREFETCH-NEXT: mips.pref 9, 0(a0) | ||
; RV32XMIPSPREFETCH-NEXT: ret | ||
; | ||
; RV64XMIPSPREFETCH-LABEL: prefetch_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 | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.