[llvm] [ConstantFold][RFC] Fold special constant value with binop absorber f… (PR #109736)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 17:47:19 PDT 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 eca5949031c31fe5ff5ad7a5df07bbce13379108 fd2da3b6060dfffc3e04b85a1aa54b28a0da8147 --extensions cpp,h -- llvm/include/llvm/IR/Constants.h llvm/lib/IR/ConstantFold.cpp llvm/lib/IR/Constants.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index bae6ef3ec8..bfa2d3ae5b 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -2741,7 +2741,7 @@ Constant *ConstantExpr::getBinOpAbsorber(unsigned Opcode, Type *Ty,
default:
break;
- case Instruction::Or: // -1 | X = -1
+ case Instruction::Or: // -1 | X = -1
return Constant::getAllOnesValue(Ty);
case Instruction::And: // 0 & X = 0
``````````
</details>
https://github.com/llvm/llvm-project/pull/109736
More information about the llvm-commits
mailing list