This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Ignore return sext/zext attributes of unused results for tail calls
ClosedPublic

Authored by thegameg on Jan 9 2019, 4:33 AM.

Details

Summary

If the caller's return type does not have a zeroext attribute but the callee does a tail call zeroext, we won't consider the tail call during CodeGenPrepare because the attributes don't match.

However, if the result of the tail call has no uses, it makes sense to drop the sext/zext attributes.

Diff Detail

Repository
rL LLVM

Event Timeline

thegameg created this revision.Jan 9 2019, 4:33 AM
hfinkel accepted this revision.Jan 9 2019, 9:20 AM

LGTM

This revision is now accepted and ready to land.Jan 9 2019, 9:20 AM
This revision was automatically updated to reflect the committed changes.