[llvm] Add support for SPV_KHR_float_controls (PR #83418)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 29 04:40:59 PST 2024
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 bfcd3fa825dde06e49235620fd157540c6c1b7d7 8ad7332522058a6c1aa2f1ec95bd4ae2fd1ca85c -- llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp llvm/lib/Target/SPIRV/SPIRVSubtarget.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
index dd25f473e0..a27aeb92bb 100644
--- a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
@@ -1156,18 +1156,19 @@ static void collectReqs(const Module &M, SPIRV::ModuleAnalysisInfo &MAI,
SPIRV::OperandCategory::ExecutionModeOperand, EM, ST);
// add SPV_KHR_float_controls if the version is too low
switch (EM) {
- case SPIRV::ExecutionMode::DenormPreserve:
- case SPIRV::ExecutionMode::DenormFlushToZero:
- case SPIRV::ExecutionMode::SignedZeroInfNanPreserve:
- case SPIRV::ExecutionMode::RoundingModeRTE:
- case SPIRV::ExecutionMode::RoundingModeRTZ:
- RequireFloatControls = VerLower14;
- break;
+ case SPIRV::ExecutionMode::DenormPreserve:
+ case SPIRV::ExecutionMode::DenormFlushToZero:
+ case SPIRV::ExecutionMode::SignedZeroInfNanPreserve:
+ case SPIRV::ExecutionMode::RoundingModeRTE:
+ case SPIRV::ExecutionMode::RoundingModeRTZ:
+ RequireFloatControls = VerLower14;
+ break;
}
}
}
}
- if (RequireFloatControls && ST.canUseExtension(SPIRV::Extension::SPV_KHR_float_controls))
+ if (RequireFloatControls &&
+ ST.canUseExtension(SPIRV::Extension::SPV_KHR_float_controls))
MAI.Reqs.addExtension(SPIRV::Extension::SPV_KHR_float_controls);
}
for (auto FI = M.begin(), E = M.end(); FI != E; ++FI) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/83418
More information about the llvm-commits
mailing list