[llvm] [SelectionDAG] Make `(a & x) | (~a & y) -> (a & (x ^ y)) ^ y` available for all targets (PR #137641)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 01:28:03 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 h,cpp -- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/lib/Target/SystemZ/SystemZISelLowering.cpp llvm/lib/Target/SystemZ/SystemZISelLowering.h llvm/lib/Target/X86/X86ISelLowering.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
index 7d9b1e717..227aa8bca 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -1298,8 +1298,7 @@ bool SystemZTargetLowering::allowsMisalignedMemoryAccesses(
 
 bool SystemZTargetLowering::hasAndNot(SDValue Y) const {
   // requires VNC instruction
-  return Subtarget.hasVector() &&
-    Y.getValueType().getScalarSizeInBits() <= 128;
+  return Subtarget.hasVector() && Y.getValueType().getScalarSizeInBits() <= 128;
 }
 
 // Information about the addressing mode for a memory access.
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.h b/llvm/lib/Target/SystemZ/SystemZISelLowering.h
index 3fb077a39..f2f0bf6d8 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.h
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.h
@@ -673,7 +673,6 @@ public:
   unsigned getStackProbeSize(const MachineFunction &MF) const;
   bool hasAndNot(SDValue Y) const override;
 
-
 private:
   const SystemZSubtarget &Subtarget;
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/137641


More information about the llvm-commits mailing list