This is an archive of the discontinued LLVM Phabricator instance.

[DAG] Unroll and expand illegal result of LDEXP and POWI instead of widen.
ClosedPublic

Authored by liutianle on Jun 15 2023, 11:30 PM.

Diff Detail

Event Timeline

liutianle created this revision.Jun 15 2023, 11:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 11:30 PM
liutianle requested review of this revision.Jun 15 2023, 11:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 11:30 PM
pengfei added inline comments.Jun 16 2023, 12:57 AM
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
4092–4093

How about change like this?

fallthrough to WidenVecRes_EXTEND_VECTOR_INREG seems different from the old code that calling WidenVecRes_ExpOp.

liutianle updated this revision to Diff 532047.Jun 16 2023, 1:54 AM

If unroll fails, don't fall through but try widen and break.

pengfei accepted this revision.Jun 16 2023, 2:14 AM

LGTM.

This revision is now accepted and ready to land.Jun 16 2023, 2:14 AM

Maybe add a test case for POWI too?

liutianle updated this revision to Diff 533105.Jun 20 2023, 7:28 PM

Add powi.v2f32.i32 lit test.

This revision was landed with ongoing or failed builds.Jun 20 2023, 11:27 PM
This revision was automatically updated to reflect the committed changes.