This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Make getZeroExtendInReg take a vector VT if the operand VT is a vector.
ClosedPublic

Authored by craig.topper on Apr 6 2020, 11:48 PM.

Details

Summary

This removes a call to getScalarType from a bunch of call sites.
It also makes the behavior consistent with SIGN_EXTEND_INREG.

Diff Detail

Event Timeline

craig.topper created this revision.Apr 6 2020, 11:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2020, 11:48 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
efriedma accepted this revision.Apr 7 2020, 10:50 AM

Being consistent with SIGN_EXTEND_INREG is a good argument. LGTM with clang-format issues fixed.

llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3536

I'm a little surprised you decided to remove the call to getZeroExtendInReg here. I guess it makes sense when the type you're extending from doesn't naturally exist otherwise.

This revision is now accepted and ready to land.Apr 7 2020, 10:50 AM
This revision was automatically updated to reflect the committed changes.