[PATCH] D75482: [llvm][CodeGen][SVE] Constrain prefetch intrinsic argument to immediate values.
Francesco Petrogalli via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 2 14:56:39 PST 2020
fpetrogalli created this revision.
fpetrogalli added reviewers: andwar, sdesmalen.
Herald added subscribers: llvm-commits, psnobl, rkruppe, hiraditya, tschuett.
Herald added a reviewer: efriedma.
Herald added a project: LLVM.
The argument that sets the prefetch type of a prefetch intrinsic must
be an immediate value.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75482
Files:
llvm/include/llvm/IR/IntrinsicsAArch64.td
llvm/lib/Target/AArch64/SVEInstrFormats.td
Index: llvm/lib/Target/AArch64/SVEInstrFormats.td
===================================================================
--- llvm/lib/Target/AArch64/SVEInstrFormats.td
+++ llvm/lib/Target/AArch64/SVEInstrFormats.td
@@ -33,7 +33,7 @@
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>";
Index: llvm/include/llvm/IR/IntrinsicsAArch64.td
===================================================================
--- llvm/include/llvm/IR/IntrinsicsAArch64.td
+++ llvm/include/llvm/IR/IntrinsicsAArch64.td
@@ -1273,9 +1273,9 @@
// 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75482.247729.patch
Type: text/x-patch
Size: 1086 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200302/c76c653e/attachment.bin>
More information about the llvm-commits
mailing list