[PATCH] D120165: [SelectionDAGBuilder] Remove LegalTypes=false from a call to getShiftAmountConstant.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 18 15:18:21 PST 2022
craig.topper added a comment.
In D120165#3332985 <https://reviews.llvm.org/D120165#3332985>, @arsenm wrote:
> I don't really know why this parameter exists in the first place
I'm strongly considering removing it. getShiftAmountTy used to be broken and could return small types if LegalTypes was true. Some places in LegalizeTypes and SelectionDAGBuilder were working around this and picking MVT::i32 if it wouldn't fit. I pulled that logic into getShiftAmountTy last year. I think using pointer type when types aren't legal was also a workaround for this issue that was used by DAGCombiner originally and got sucked into getShiftAmountTy a few years ago. Maybe we can kill that off and use the MVT::i32 behavior.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120165/new/
https://reviews.llvm.org/D120165
More information about the llvm-commits
mailing list