[llvm] [IR][NFC] Remove obsolete comments in `BinaryOperator::swapOperands` (PR #125819)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 00:09:30 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Yingwei Zheng (dtcxzyw)
<details>
<summary>Changes</summary>
Closes https://github.com/llvm/llvm-project/issues/125438
---
Full diff: https://github.com/llvm/llvm-project/pull/125819.diff
1 Files Affected:
- (modified) llvm/lib/IR/Instructions.cpp (+1-2)
``````````diff
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index 1fdf0eab548fdd..e2d607368e94bf 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -2702,8 +2702,7 @@ BinaryOperator *BinaryOperator::CreateNot(Value *Op, const Twine &Name,
// Exchange the two operands to this instruction. This instruction is safe to
// use on any binary instruction and does not modify the semantics of the
-// instruction. If the instruction is order-dependent (SetLT f.e.), the opcode
-// is changed.
+// instruction.
bool BinaryOperator::swapOperands() {
if (!isCommutative())
return true; // Can't commute operands
``````````
</details>
https://github.com/llvm/llvm-project/pull/125819
More information about the llvm-commits
mailing list