[Mlir-commits] [mlir] [mlir][amdgpu] Add scaled_ext_packed{8, 16} operations (PR #159830)

Jakub Kuderski llvmlistbot at llvm.org
Fri Oct 17 08:50:49 PDT 2025


================
@@ -345,8 +345,12 @@ LogicalResult ScaledExtPacked816Op::verify() {
   int blockSize = getBlockSize();
   assert((blockSize == 16 || blockSize == 32) && "invalid block size");
   int firstScaleByte = getFirstScaleByte();
-  if (blockSize == 16 && firstScaleByte == 2) {
-    return emitOpError("blockSize of 16 cannot have firstScaleByte be 2.");
+  if (blockSize == 16 && !::llvm::is_contained({0, 1}, firstScaleByte)) {
+    return emitOpError(
+        "blockSize of 16 can only have firstScaleByte be 0 or 1.");
+  } else if (blockSize == 32 && !::llvm::is_contained({0, 2}, firstScaleByte)) {
----------------
kuhar wrote:

no else after return https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return

https://github.com/llvm/llvm-project/pull/159830


More information about the Mlir-commits mailing list