[PATCH] D71657: [SDAG] Handle BUILD_PAIR in ComputeNumSignBits
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 12:34:53 PST 2019
craig.topper requested changes to this revision.
craig.topper added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:3461
+ case ISD::BUILD_PAIR:
+ Tmp = ComputeNumSignBits(Op.getOperand(1), Depth + 1);
+ if (Op.getOperand(1).getValueSizeInBits() == Tmp)
----------------
I don't think this is correct. If the first call returns "all sign bits" then we check operand(0) that call will always return at least 1. So we increase the total by at least 1. So its impossible for this code to ever return that the number of sign bits of a build_pair is exactly half the total size of the build_pair. That seems wrong.
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