[PATCH] D71657: [SDAG] Handle BUILD_PAIR in ComputeNumSignBits

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 30 15:20:11 PST 2019


bjope added a comment.

In D71657#1799309 <https://reviews.llvm.org/D71657#1799309>, @craig.topper wrote:

> @danilaml for your original case, why isn't CodeGenPrepare helping by sinking the sext?


Maybe it has been edited, but above the original example it says:

> (needs -mllvm -disable-cgp to prevent sext sinking)

About "how to test", maybe it is possible to use  unittests/CodeGen/AArch64SelectionDAGTest.cpp (or a similar mockup). We already got a few ComputeKnownBits tests placed there.

Btw, one option (if the SMUL_LOHI is important for your target here) could be to detect the widening multiplication in a pass just before ISel, and rewrite mul into some kind of smul_lohi intrinsic.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71657





More information about the llvm-commits mailing list