[llvm] 779e2c7 - [llvm][CodeGen][SVE] Constrain prefetch intrinsic argument to immediate values.
Francesco Petrogalli via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 07:25:56 PST 2020
Author: Francesco Petrogalli
Date: 2020-03-03T15:25:08Z
New Revision: 779e2c7a1a2638092fcb33f488ce51a50d140ea0
URL: https://github.com/llvm/llvm-project/commit/779e2c7a1a2638092fcb33f488ce51a50d140ea0
DIFF: https://github.com/llvm/llvm-project/commit/779e2c7a1a2638092fcb33f488ce51a50d140ea0.diff
LOG: [llvm][CodeGen][SVE] Constrain prefetch intrinsic argument to immediate values.
Summary:
The argument that sets the prefetch type of a prefetch intrinsic must
be an immediate value.
Reviewers: andwar, sdesmalen, efriedma
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75482
Added:
Modified:
llvm/include/llvm/IR/IntrinsicsAArch64.td
llvm/lib/Target/AArch64/SVEInstrFormats.td
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/IntrinsicsAArch64.td b/llvm/include/llvm/IR/IntrinsicsAArch64.td
index 3976dde3d750..12756e3406be 100644
--- a/llvm/include/llvm/IR/IntrinsicsAArch64.td
+++ b/llvm/include/llvm/IR/IntrinsicsAArch64.td
@@ -1273,9 +1273,9 @@ def int_aarch64_sve_stnt1 : AdvSIMD_1Vec_PredStore_Intrinsic;
// Prefetch
//
-def int_aarch64_sve_prf : Intrinsic<[], [llvm_anyvector_ty,
- llvm_ptr_ty,
- llvm_i32_ty], [IntrArgMemOnly]>;
+def int_aarch64_sve_prf
+ : Intrinsic<[], [llvm_anyvector_ty, llvm_ptr_ty, llvm_i32_ty],
+ [IntrArgMemOnly, ImmArg<2>]>;
//
// Scalar to vector operations
diff --git a/llvm/lib/Target/AArch64/SVEInstrFormats.td b/llvm/lib/Target/AArch64/SVEInstrFormats.td
index b055012ad855..289c5aafa5a4 100644
--- a/llvm/lib/Target/AArch64/SVEInstrFormats.td
+++ b/llvm/lib/Target/AArch64/SVEInstrFormats.td
@@ -33,7 +33,7 @@ def SVEPrefetchOperand : AsmOperandClass {
let RenderMethod = "addPrefetchOperands";
}
-def sve_prfop : Operand<i32>, ImmLeaf<i32, [{
+def sve_prfop : Operand<i32>, TImmLeaf<i32, [{
return (((uint32_t)Imm) <= 15);
}]> {
let PrintMethod = "printPrefetchOp<true>";
More information about the llvm-commits
mailing list