diff options
author | Archibald Elliott <archibald.elliott@arm.com> | 2022-12-07 10:04:30 +0000 |
---|---|---|
committer | Archibald Elliott <archibald.elliott@arm.com> | 2022-12-16 14:42:27 +0000 |
commit | 82b51a14280414a53413ed62c001d2c589c649c3 (patch) | |
tree | 4f0a241f025d80eff06abdbb261267cf7dc19b10 /llvm/lib/IR/Verifier.cpp | |
parent | f86cdb4853618603b8889dfeb932fd4ef8efd010 (diff) | |
download | llvm-82b51a14280414a53413ed62c001d2c589c649c3.zip llvm-82b51a14280414a53413ed62c001d2c589c649c3.tar.gz llvm-82b51a14280414a53413ed62c001d2c589c649c3.tar.bz2 |
[AArch64] Support SLC in ACLE prefetch intrinsics
This change:
- Modifies the ACLE code to allow the new SLC value (3) for the prefetch
target.
- Introduces a new intrinsic, @llvm.aarch64.prefetch which matches the
PRFM family instructions much more closely, and can represent all
values for the PRFM immediate.
The target-independent @llvm.prefetch intrinsic does not have enough
information for us to be able to lower to it from the ACLE intrinsics
correctly.
- Lowers the acle calls to the new intrinsic on aarch64 (the ARM
lowering is unchanged).
- Implements code generation for the new intrinsic in both SelectionDAG
and GlobalISel. We specifically choose to continue to support lowering
the target-independent @llvm.prefetch intrinsic so that other
frontends can continue to use it.
Differential Revision: https://reviews.llvm.org/D139443
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 093b30d..910d1db 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -5754,6 +5754,17 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) { &Call); break; } + case Intrinsic::aarch64_prefetch: { + Check(cast<ConstantInt>(Call.getArgOperand(1))->getZExtValue() < 2, + "write argument to llvm.aarch64.prefetch must be 0 or 1", Call); + Check(cast<ConstantInt>(Call.getArgOperand(2))->getZExtValue() < 4, + "target argument to llvm.aarch64.prefetch must be 0-3", Call); + Check(cast<ConstantInt>(Call.getArgOperand(3))->getZExtValue() < 2, + "stream argument to llvm.aarch64.prefetch must be 0 or 1", Call); + Check(cast<ConstantInt>(Call.getArgOperand(4))->getZExtValue() < 2, + "isdata argument to llvm.aarch64.prefetch must be 0 or 1", Call); + break; + } }; } |