From 29b7f70c98bb4c888d675fb4bfae3ce5787469c9 Mon Sep 17 00:00:00 2001 From: Andrey Pavlenko Date: Tue, 14 Oct 2025 08:14:20 +0000 Subject: [PATCH] Fix clang error: add explicit braces to avoid dangling else --- .../intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp b/third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp index 040b05ce7d..03e3d8d90e 100644 --- a/third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp +++ b/third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp @@ -2028,7 +2028,7 @@ struct LoadOpToBlockIOConversion Value other = op.getOther(); Value llOther = adaptor.getOther(); DenseElementsAttr constAttr; - if (other) + if (other) { if (matchPattern(other, m_Constant(&constAttr)) && constAttr.isSplat()) { Type elemTy = constAttr.getElementType(); auto handleSplatValue = [&](auto splatVal) { @@ -2049,6 +2049,7 @@ struct LoadOpToBlockIOConversion } else { otherElems = unpackLLElements(loc, llOther, rewriter); } + } // re-arrange the ptrs and masks to for large 2D block IO. // Layout is unrelated to the scalar type. @@ -2562,7 +2563,7 @@ struct LoadOpToBlockIOConversion SmallVector otherElems; Value llOther = adaptor.getOther(); DenseElementsAttr constAttr; - if (other) + if (other) { if (matchPattern(other, m_Constant(&constAttr)) && constAttr.isSplat()) { Type elemTy = constAttr.getElementType(); auto handleSplatValue = [&](auto splatVal) { @@ -2583,6 +2584,7 @@ struct LoadOpToBlockIOConversion } else { otherElems = unpackLLElements(loc, llOther, rewriter); } + } unsigned threadsPerWarp = TritonGPUDialect::getThreadsPerWarp(op->getParentOfType());