[PATCH] D15134: Part 1 to fix x86_64 fp128 calling convention.

Chih-Hung Hsieh via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 1 16:44:47 PST 2015


chh created this revision.
chh added reviewers: davidxl, rnk, echristo.
chh added subscribers: llvm-commits, grosbach, resistor, qcolombet, martell, tberghammer, srhines, enh, danalbert.

This is part 1 subset of http://reviews.llvm.org/D11438,
without the .td and new fp128 unit tests.

Most of the changes here only apply to the new x86_64 f128 type configuration,
which is not enable in this part.

Bugs:
  https://llvm.org/bugs/show_bug.cgi?id=24109
  https://llvm.org/bugs/show_bug.cgi?id=23897

Changes:
* Relax type legalization checks to accept new f128 type configuration,
  whose TypeAction is TypeSoftenFloat, not TypeLegal, but also has TLI.isTypeLegal true.
* Relax GetSoftenedFloat to return in some cases f128 type SDValue,
  which is TLI.isTypeLegal but not "softened" to i128 node.
* Allow customized FABS, FNEG, FCOPYSIGN on new f128 type configuration,
  to generate optimized bitwise operators for libm functions.
  Enhance related Lower* functions to handle f128 type.
* Enhance DAGTypeLegalizer::run, SoftenFloatResult, and related functions
  to keep new f128 type in register, and convert f128 operators to library calls.
* Fix Combiner, Emitter, Legalizer routines that did not handle f128 type.
* Add ExpandConstant to handle i128 constants, ExpandNode to handle ISD::Constant node.
* Add one more parameter to getCommonSubClass and firstCommonClass,
  to guarantee that returned common sub class will contain the specified simple value type.
  This extra parameter is used by EmitCopyFromReg in InstrEmitter.cpp.
* Fix infinite loop in getTypeLegalizationCost when f128 is the value type.
* Fix printOperand to handle null operand.
* Enhance ISD::BITCAST node to handle f128 constant.
* Expand new f128 type for BR_CC, SELECT_CC, SELECT, SETCC nodes.
* Enhance X86AsmPrinter to emit f128 values in comments.


http://reviews.llvm.org/D15134

Files:
  include/llvm/Target/TargetLowering.h
  include/llvm/Target/TargetRegisterInfo.h
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/CodeGen/SelectionDAG/InstrEmitter.cpp
  lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
  lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
  lib/CodeGen/SelectionDAG/LegalizeTypes.h
  lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
  lib/CodeGen/SelectionDAG/TargetLowering.cpp
  lib/CodeGen/TargetLoweringBase.cpp
  lib/CodeGen/TargetRegisterInfo.cpp
  lib/Target/X86/X86MCInstLower.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15134.41578.patch
Type: text/x-patch
Size: 34443 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151202/18989a9b/attachment.bin>


More information about the llvm-commits mailing list