[X86] Part 2 to fix x86-64 fp128 calling convention.
authorChih-Hung Hsieh <chh@google.com>
Mon, 14 Dec 2015 22:08:36 +0000 (22:08 +0000)
committerChih-Hung Hsieh <chh@google.com>
Mon, 14 Dec 2015 22:08:36 +0000 (22:08 +0000)
commit3a1999a31131b95b9ae19cdcfb8bc00bf585ed85
treed3f4f042796e313c4ac15b183ccb01e532cdcc4f
parenta3a48d96c997f098f504a250ccd38dcb773c233c
[X86] Part 2 to fix x86-64 fp128 calling convention.

Part 1 was submitted in http://reviews.llvm.org/D15134.
Changes in this part:
* X86RegisterInfo.td, X86RecognizableInstr.cpp: Add FR128 register class.
* X86CallingConv.td: Pass f128 values in XMM registers or on stack.
* X86InstrCompiler.td, X86InstrInfo.td, X86InstrSSE.td:
  Add instruction selection patterns for f128.
* X86ISelLowering.cpp:
  When target has MMX registers, configure MVT::f128 in FR128RegClass,
  with TypeSoftenFloat action, and custom actions for some opcodes.
  Add missed cases of MVT::f128 in places that handle f32, f64, or vector types.
  Add TODO comment to support f128 type in inline assembly code.
* SelectionDAGBuilder.cpp:
  Fix infinite loop when f128 type can have
  VT == TLI.getTypeToTransformTo(Ctx, VT).
* Add unit tests for x86-64 fp128 type.

Differential Revision: http://reviews.llvm.org/D11438

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255558 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/Target/X86/X86CallingConv.td
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrCompiler.td
lib/Target/X86/X86InstrInfo.td
lib/Target/X86/X86InstrSSE.td
lib/Target/X86/X86RegisterInfo.td
test/CodeGen/X86/fp128-calling-conv.ll [new file with mode: 0644]
test/CodeGen/X86/fp128-cast.ll [new file with mode: 0644]
test/CodeGen/X86/fp128-compare.ll [new file with mode: 0644]
test/CodeGen/X86/fp128-i128.ll [new file with mode: 0644]
test/CodeGen/X86/fp128-libcalls.ll [new file with mode: 0644]
test/CodeGen/X86/fp128-load.ll [new file with mode: 0644]
test/CodeGen/X86/fp128-store.ll [new file with mode: 0644]
test/CodeGen/X86/soft-fp.ll
utils/TableGen/X86RecognizableInstr.cpp