[Mlir-commits] [mlir] [mlir][gpu] Add gpu.rotate operation (PR #142796)
Jakub Kuderski
llvmlistbot at llvm.org
Mon Jun 30 09:11:01 PDT 2025
================
@@ -1365,8 +1365,12 @@ LogicalResult RotateOp::verify() {
if (!widthValue.isPowerOf2())
return emitOpError() << "width must be a power of two";
- if (offsetValue.sge(widthValue) || offsetValue.slt(0))
- return emitOpError() << "offset must be in the range [0, width)";
+ if (offsetValue.sge(widthValue) || offsetValue.slt(0)) {
+ SmallString<8> widthStr;
+ widthValue.toStringUnsigned(widthStr);
+ return emitOpError() << "offset must be in the range [0, "
+ << std::string(std::move(widthStr)) << ")";
----------------
kuhar wrote:
I think we can print this as sign-extended to int64 and avoid explicit printing to string
https://github.com/llvm/llvm-project/pull/142796
More information about the Mlir-commits
mailing list