[llvm] Min and Max are associative (PR #82621)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 22 06:01:38 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 5b8e5604c297aa8fd09bf641d12d0a663e0ea801 233083382d1b3f0b2925af1096cf50555728e01e -- llvm/include/llvm/IR/Instruction.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/IR/Instruction.h b/llvm/include/llvm/IR/Instruction.h
index 1b71448fce..153c8dab10 100644
--- a/llvm/include/llvm/IR/Instruction.h
+++ b/llvm/include/llvm/IR/Instruction.h
@@ -668,13 +668,13 @@ public:
///
/// Associative operators satisfy: x op (y op z) === (x op y) op z
///
- /// In LLVM, the Add, Mul, And, Or, Xor, Min and Max operators are associative.
+ /// In LLVM, the Add, Mul, And, Or, Xor, Min and Max operators are
+ /// associative.
///
bool isAssociative() const LLVM_READONLY;
static bool isAssociative(unsigned Opcode) {
- return Opcode == And || Opcode == Or || Opcode == Xor ||
- Opcode == Add || Opcode == Mul || Opcode == Min ||
- Opcode == Max;
+ return Opcode == And || Opcode == Or || Opcode == Xor || Opcode == Add ||
+ Opcode == Mul || Opcode == Min || Opcode == Max;
}
/// Return true if the instruction is commutative:
``````````
</details>
https://github.com/llvm/llvm-project/pull/82621
More information about the llvm-commits
mailing list