Skip to content

Commit

Permalink
[polly] Fix build
Browse files Browse the repository at this point in the history
This produced a compile error with GCC:

llvm-project/polly/lib/Transform/ScheduleOptimizer.cpp:1220:49: error: cannot convert ‘bool’ to ‘llvm::TargetTransformInfo::RegisterKind’
 1220 |     RegisterBitwidth = TTI->getRegisterBitWidth(true);
  • Loading branch information
nikic authored and memfrob committed Oct 4, 2022
1 parent 301768a commit 234cb26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion polly/lib/Transform/ScheduleOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,8 @@ getMicroKernelParams(const TargetTransformInfo *TTI, MatMulInfoTy MMI) {
long RegisterBitwidth = VectorRegisterBitwidth;

if (RegisterBitwidth == -1)
RegisterBitwidth = TTI->getRegisterBitWidth(true);
RegisterBitwidth =
TTI->getRegisterBitWidth(TargetTransformInfo::RGK_FixedWidthVector);
auto ElementSize = getMatMulTypeSize(MMI);
assert(ElementSize > 0 && "The element size of the matrix multiplication "
"operands should be greater than zero.");
Expand Down

0 comments on commit 234cb26

Please sign in to comment.