[X86][FastISel] Support materializing floating-point constants for large code model...
authorFangrui Song <maskray@google.com>
Sun, 23 Aug 2020 15:35:59 +0000 (08:35 -0700)
committerFangrui Song <maskray@google.com>
Sun, 23 Aug 2020 15:36:18 +0000 (08:36 -0700)
commitbef684154d400df5cfd935a18ed7312a582fe5eb
tree1dfc85bc808ab77e9fada481378cc5146516a52a
parenta1dc3d241ba00042b6160287f887d1019e36bae0
[X86][FastISel] Support materializing floating-point constants for large code model & PIC

The following program miscompiles because rL216012 added static
relocation model support but not for PIC.

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

This patch adds PIC support.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D86024
llvm/lib/Target/X86/X86FastISel.cpp
llvm/test/CodeGen/X86/fast-isel-constpool.ll