[llvm] Reland [SPIR-V] Support `SPV_INTEL_int4` extension (PR #141279)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 23 11:56:08 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- llvm/lib/Target/SPIRV/SPIRVCommandLine.cpp llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp b/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
index ee6d32eb9..b1d3a220f 100644
--- a/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
@@ -402,9 +402,8 @@ static void widenCImmType(MachineOperand &MOP) {
unsigned NewWidth = widenBitWidthToNextPow2(CurrentWidth);
if (NewWidth != CurrentWidth) {
// Replace the immediate value with the widened version
- MOP.setCImm(ConstantInt::get(
- CImmVal->getType()->getContext(),
- CImmVal->getValue().zextOrTrunc(NewWidth)));
+ MOP.setCImm(ConstantInt::get(CImmVal->getType()->getContext(),
+ CImmVal->getValue().zextOrTrunc(NewWidth)));
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/141279
More information about the llvm-commits
mailing list