[llvm] [RISCV] Add ORC_B to SimplifyDemandedBitsForTargetNode. (PR #141975)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 29 09:26:46 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 cpp -- llvm/lib/Target/RISCV/RISCVISelLowering.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 133c60955..b58f0aac5 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -20745,10 +20745,8 @@ bool RISCVTargetLowering::SimplifyDemandedBitsForTargetNode(
 
     // To compute zeros for ORC_B, we need to invert the value and invert it
     // back after. This inverting is harmless for BREV8.
-    Known.Zero =
-        ~computeGREVOrGORC(~Known2.Zero.getZExtValue(), 7, IsGORC);
-    Known.One =
-        computeGREVOrGORC(Known2.One.getZExtValue(), 7, IsGORC);
+    Known.Zero = ~computeGREVOrGORC(~Known2.Zero.getZExtValue(), 7, IsGORC);
+    Known.One = computeGREVOrGORC(Known2.One.getZExtValue(), 7, IsGORC);
     return false;
   }
   }

``````````

</details>


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


More information about the llvm-commits mailing list