This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Materialize FP constant in code for large code model
ClosedPublic

Authored by Hahnfeld on Mar 30 2021, 9:55 AM.

Details

Summary

When using the large code model with FastISel (for example via
clang -O0 which adds the optnone attribute), FP constants could
still be materialized using adrp + ldr. Unconditionally enable
the existing path for MachO to materialize the constant in code.

For testing, restore literal_pools_float.ll to exercise the constant
pool and add two optnone-functions that return a float and a double,
respectively. Consolidate fpimm.ll and add a new fast-isel-fpimm.ll
to check the code paths taken with FastISel.

Diff Detail

Event Timeline

Hahnfeld created this revision.Mar 30 2021, 9:55 AM
Hahnfeld requested review of this revision.Mar 30 2021, 9:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2021, 9:55 AM
aemerson accepted this revision.Apr 7 2021, 9:50 AM

LGTM.

This revision is now accepted and ready to land.Apr 7 2021, 9:50 AM