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

Danila Malyutin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 30 08:13:25 PST 2019


danilaml marked an inline comment as done.
danilaml added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:3462
+    Tmp = ComputeNumSignBits(Op.getOperand(1), Depth + 1);
+    if (Op.getOperand(1).getValueSizeInBits() == Tmp)
+      Tmp += ComputeNumSignBits(Op.getOperand(0), Depth + 1);
----------------
@craig.topper I could leave this part out of the patch, however this reduces its usefulness (as it'll no longer solve the problem I've mentioned before).
Does this make sense? Perhaps there is some other way to get the info I want (i.e. that two values are just parts of the same original value, so share it's sign bits)? If not, is there a straightforward way to add it? If I understood correctly, this whole thing will become obsolete after transition to GlobalIsel so I'm not sure if it'll be worth the effort.


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