[llvm] [DAG] Remove OneUse restriction on sext when folding (shl (sext (add_nsw x, c1)), c2) (PR #68972)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 19 22:49:26 PDT 2023
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 f8325f12606d7c8510abbf933bf95983bf66da7d 9efabd4fd4823a71a6c04400447ff3d60ad78eaf -- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/lib/Target/X86/X86ISelLowering.cpp llvm/lib/Target/X86/X86ISelLowering.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index a0922c8ad0a9..58535cca4901 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -3376,8 +3376,8 @@ bool X86TargetLowering::isDesirableToCommuteWithShift(
N->getOpcode() == ISD::SRL) &&
"Expected shift op");
SDValue N0 = N->getOperand(0).getOpcode() == ISD::SIGN_EXTEND
- ? N->getOperand(0)->getOperand(0)
- : N->getOperand(0);
+ ? N->getOperand(0)->getOperand(0)
+ : N->getOperand(0);
return N0.hasOneUse();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/68972
More information about the llvm-commits
mailing list