getShiftAmountTy will return MVT::i32 if the shift amount
coming from the target's getScalarShiftAmountTy can't reprsent
all possible values. That should eliminate the need to use the
pointer type which is what we do when LegalTypes is false.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
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.