[PATCH] D133768: [DAGCombine] Do not fold SRA/SRL of MUL into MULH when MUL's LSB are used, and MUL_LOHI is available

Juan Manuel Martinez CaamaƱo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 08:20:06 PST 2022


jmmartinez added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9249
+  auto UserOfLowerBits = [NarrowVTSize](SDNode *U) {
+    if (U->getOpcode() != ISD::SRL || U->getOpcode() != ISD::SRA) {
+      return true;
----------------
RKSimon wrote:
> @jmmartinez I'm getting static analysis warnings that this is always true - should this be:
> ```
> if (U->getOpcode() != ISD::SRL && U->getOpcode() != ISD::SRA) {
> ```
Well spotted! I'll submit a fix for it. BTW what are you using for static analysis?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133768/new/

https://reviews.llvm.org/D133768



More information about the llvm-commits mailing list