This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Fix the artifact combiner to fold G_IMPLICIT_DEF properly
ClosedPublic

Authored by volkan on Oct 8 2018, 12:46 PM.

Details

Summary

GlobalISel generates incorrect code because the legalizer artifact
combiner assumes G_[SZ]EXT (G_IMPLICIT_DEF) is equivalent to
G_IMPLICIT_DEF .

Replace G_[SZ]EXT (G_IMPLICIT_DEF) with 0 because the top bits
will be 0 for G_ZEXT and 0/1 for the G_SEXT.

Diff Detail

Repository
rL LLVM

Event Timeline

volkan created this revision.Oct 8 2018, 12:46 PM
This revision is now accepted and ready to land.Oct 9 2018, 4:13 PM
This revision was automatically updated to reflect the committed changes.