This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Try to fold G_SEXT_INREG to G_AND with mask
ClosedPublic

Authored by arsenm on Nov 15 2022, 2:55 PM.

Details

Summary

Copies the same transform from the DAG. Helps eliminate some codegen
diffs to allowed shared checks in a future change.

Not sure if apply supports anything better than C++ fragments for
the result. It's also not really reasonable that every combine has
to set the default insertion point.

Diff Detail

Event Timeline

arsenm created this revision.Nov 15 2022, 2:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 15 2022, 2:55 PM
arsenm requested review of this revision.Nov 15 2022, 2:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 15 2022, 2:55 PM
Herald added a subscriber: wdng. · View Herald Transcript
This revision is now accepted and ready to land.Nov 15 2022, 2:58 PM
foad added a comment.Nov 15 2022, 10:53 PM

Can you add a test case with vector types?

arsenm updated this revision to Diff 475703.Nov 16 2022, 12:05 AM

Add vector tests. The constant simplify in the scalar case seems to not happen here after the fold