This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add basic umulo and smulo costs
ClosedPublic

Authored by dmgreen on Jan 6 2022, 2:47 AM.

Details

Summary

This adds some AArch64 specific smul_with_overflow and umul_with_overflow costs, overriding the default costs. The code generation for these mul with overflow intrinsics is usually better than the default expansion on AArch64. The costs come from https://godbolt.org/z/zEzYhMWqo with various types, or https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/AArch64/arm64-xaluo.ll.

Diff Detail

Event Timeline

dmgreen created this revision.Jan 6 2022, 2:47 AM
dmgreen requested review of this revision.Jan 6 2022, 2:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2022, 2:47 AM
fhahn accepted this revision.Jan 6 2022, 3:35 AM

LGTM, thanks!

This revision is now accepted and ready to land.Jan 6 2022, 3:35 AM
This revision was automatically updated to reflect the committed changes.