This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeType][X86] Support WidenVecRes_AssertZext and SplitVecRes_AssertZext for ISD::AssertZext during LegalizeType procedure
ClosedPublic

Authored by yubing on May 19 2023, 1:07 AM.

Diff Detail

Event Timeline

yubing created this revision.May 19 2023, 1:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2023, 1:07 AM
yubing requested review of this revision.May 19 2023, 1:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2023, 1:07 AM
craig.topper added inline comments.May 19 2023, 1:10 AM
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
5131

The extra elements added by widening aren’t guaranteed to satisfy the Asserted property.

RKSimon added inline comments.May 19 2023, 2:34 AM
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
5131

You can probably use ModifyToType to fill the new elements with zero

yubing updated this revision to Diff 524100.May 21 2023, 7:22 AM

address comments

craig.topper added inline comments.May 21 2023, 9:51 PM
llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
575

This isn't indented enough

llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
951

Line up with the previous line.

llvm/test/CodeGen/X86/legalize-vec-assertzext.ll
15

Doesn't IR normally use 2 spaces of indentation not 4?

This revision is now accepted and ready to land.May 22 2023, 11:11 AM
This revision was landed with ongoing or failed builds.May 23 2023, 7:17 PM
This revision was automatically updated to reflect the committed changes.