Skip to content

Commit 38b30eb

Browse files
committed
[LowerMatrixIntrinsics] Call getRegisterClassForType before getNumberOfRegisters.
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. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D116903
1 parent a2c33b0 commit 38b30eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,8 @@ class LowerMatrixIntrinsics {
13911391
// reloads necessary.
13921392
unsigned Op0Regs = (R + VF - 1) / VF * M;
13931393
unsigned Op1Regs = (M + VF - 1) / VF * C;
1394-
return Op0Regs + Op1Regs > TTI.getNumberOfRegisters(true);
1394+
return Op0Regs + Op1Regs >
1395+
TTI.getNumberOfRegisters(TTI.getRegisterClassForType(true));
13951396
}
13961397

13971398
MatrixTy getZeroMatrix(Type *EltType, unsigned R, unsigned C) {

0 commit comments

Comments
 (0)