[PATCH] D116903: [LowerMatrixIntrinsics] Call getRegisterClassForType before getNumberOfRegisters.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 9 15:23:20 PST 2022
craig.topper created this revision.
craig.topper added reviewers: fhahn, RKSimon, spatel, lebedev.ri.
Herald added a subscriber: hiraditya.
craig.topper requested review of this revision.
Herald added a project: LLVM.
getNumberOfRegisters takes a ClassID as it's argument. It shouldn't be passed a bool. Assuming the bool meant vector or not, we should call getRegisterClassForType first.
https://reviews.llvm.org/D116903
Files:
llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
Index: llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
+++ llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
@@ -1391,7 +1391,8 @@
// reloads necessary.
unsigned Op0Regs = (R + VF - 1) / VF * M;
unsigned Op1Regs = (M + VF - 1) / VF * C;
- return Op0Regs + Op1Regs > TTI.getNumberOfRegisters(true);
+ return Op0Regs + Op1Regs >
+ TTI.getNumberOfRegisters(TTI.getRegisterClassForType(true));
}
MatrixTy getZeroMatrix(Type *EltType, unsigned R, unsigned C) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116903.398465.patch
Type: text/x-patch
Size: 628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220109/7ad0e24a/attachment.bin>
More information about the llvm-commits
mailing list