This is an archive of the discontinued LLVM Phabricator instance.

[X86][FastISel] Support materializing floating-point constants for large code model & PIC
ClosedPublic

Authored by MaskRay on Aug 15 2020, 2:26 PM.

Details

Summary

The following program will compile incorrectly because rL216012 added
static relocation model support but not for PIC.

// clang -fpic -mcmodel=large a.cc
double foo() { return 42.0; }

This patch adds PIC support.

Diff Detail

Event Timeline

MaskRay created this revision.Aug 15 2020, 2:26 PM
MaskRay requested review of this revision.Aug 15 2020, 2:26 PM
MaskRay updated this revision to Diff 285865.Aug 15 2020, 3:00 PM

Simplify (PICBase may be 0 -> degenerates to addDirectMem)

This revision is now accepted and ready to land.Aug 23 2020, 12:38 AM
MaskRay edited the summary of this revision. (Show Details)Aug 23 2020, 8:34 AM