[PATCH] D56283: [X86] Add INSERT_SUBVECTOR to ComputeNumSignBits

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 3 14:45:10 PST 2019


craig.topper marked 2 inline comments as done.
craig.topper added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:3739
+      if (Tmp == 1) return 1; // early-out
+      Tmp2 = ComputeNumSignBits(Src, Depth + 1);
+      Tmp = std::min(Tmp, Tmp2);
----------------
RKSimon wrote:
> Is it safe to use DemandedElts at least on Src?
Maybe, but in practice we probably don't have insert_subvector with non-constant or out of bounds elements so its not going to get used much. We don't pass the demanded mask on the equivalent path in computeKnownBits either.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:3743
+    }
+  }
+  }
----------------
RKSimon wrote:
> Add a break - even though its the last case in the switch
I'm going to drop the else around this since we returned in the earlier block.


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

https://reviews.llvm.org/D56283





More information about the llvm-commits mailing list