[clang] [llvm] [IR] Don't set strictfp on irrelevant calls (PR #122735)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 08:13:35 PST 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 8e1b49c38edc667b0d740f19b24c9796b948c274 f149c7c995fb84878b7075ed9a26fae6452f6044 --extensions h,cpp,c -- clang/test/CodeGen/SystemZ/strictfp_builtins.c clang/test/CodeGen/X86/strictfp_builtins.c clang/test/CodeGen/cx-complex-range.c clang/test/CodeGen/isfpclass.c clang/test/CodeGen/strictfp-elementwise-bulitins.cpp clang/test/CodeGen/strictfp_builtins.c llvm/include/llvm/IR/IRBuilder.h llvm/include/llvm/IR/IntrinsicInst.h llvm/lib/IR/IRBuilder.cpp llvm/lib/IR/IntrinsicInst.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index a8d519abd1..7b0b01253b 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -2443,7 +2443,8 @@ public:
   CallInst *CreateCall(FunctionType *FTy, Value *Callee,
                        ArrayRef<Value *> Args = {}, const Twine &Name = "",
                        MDNode *FPMathTag = nullptr) {
-    return CreateCall(FTy, Callee, Args, DefaultOperandBundles, Name, FPMathTag);
+    return CreateCall(FTy, Callee, Args, DefaultOperandBundles, Name,
+                      FPMathTag);
   }
 
   CallInst *CreateCall(FunctionType *FTy, Value *Callee, ArrayRef<Value *> Args,
diff --git a/llvm/lib/IR/IntrinsicInst.cpp b/llvm/lib/IR/IntrinsicInst.cpp
index 5549246efb..67b44d11fa 100644
--- a/llvm/lib/IR/IntrinsicInst.cpp
+++ b/llvm/lib/IR/IntrinsicInst.cpp
@@ -69,7 +69,7 @@ bool IntrinsicInst::mayLowerToFunctionCall(Intrinsic::ID IID) {
 bool IntrinsicInst::canAccessFPEnvironment(Intrinsic::ID IID) {
   switch (IID) {
 #define DAG_INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC, DAGN)               \
-case Intrinsic::INTRINSIC:
+  case Intrinsic::INTRINSIC:
 #include "llvm/IR/ConstrainedOps.def"
     return true;
   default:

``````````

</details>


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


More information about the llvm-commits mailing list