[llvm] [Intrinsics] Add support for range attributes (PR #135642)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 14 09:41:12 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,h -- llvm/include/llvm/IR/Intrinsics.h llvm/lib/IR/AutoUpgrade.cpp llvm/lib/IR/Function.cpp llvm/lib/IR/Intrinsics.cpp llvm/lib/Target/AMDGPU/SIISelLowering.cpp llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp llvm/utils/TableGen/Basic/CodeGenIntrinsics.h llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 35d7456df..699191ceb 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -1522,8 +1522,7 @@ bool llvm::UpgradeIntrinsicFunction(Function *F, Function *&NewFn,
if (Intrinsic::ID id = F->getIntrinsicID()) {
// Only do this if the intrinsic signature is valid.
SmallVector<Type *> OverloadTys;
- if (Intrinsic::getIntrinsicSignature(id, F->getFunctionType(),
- OverloadTys))
+ if (Intrinsic::getIntrinsicSignature(id, F->getFunctionType(), OverloadTys))
F->setAttributes(
Intrinsic::getAttributes(F->getContext(), id, F->getFunctionType()));
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/135642
More information about the llvm-commits
mailing list