This is an archive of the discontinued LLVM Phabricator instance.

[LibCalls] Respect TLI.getExtAttrForI32Param() in inferLibFuncAttributes().
ClosedPublic

Authored by jonpa on Apr 4 2022, 6:59 AM.

Details

Summary

getExtAttrForI32Param() is the method to be used for determining the type of extension attribute (if any) that is to be added for a signed/unsigned argument.

Previously, the SExt attribute was always added to the i32 ldexp* argument as it was expected to be ignored by targets not needing it. This patch now changes this so that it is only added for the targets that need it in the first place.

Test updated to reflect this (annotate.ll).

Patch in progress: putchar argument (fixes https://github.com/llvm/llvm-project/issues/54532) is now also extended, but there are many more to follow.

Diff Detail

Event Timeline

jonpa created this revision.Apr 4 2022, 6:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2022, 6:59 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
jonpa requested review of this revision.Apr 4 2022, 6:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2022, 6:59 AM
efriedma accepted this revision.Apr 4 2022, 9:20 AM

LGTM (with formatting fixed).

This revision is now accepted and ready to land.Apr 4 2022, 9:20 AM
This revision was landed with ongoing or failed builds.Apr 5 2022, 1:30 AM
This revision was automatically updated to reflect the committed changes.