[legalize-types] Clean up softening machinery.
authorAnton Yartsev <anton.yartsev@gmail.com>
Tue, 4 Jul 2017 01:08:55 +0000 (01:08 +0000)
committerAnton Yartsev <anton.yartsev@gmail.com>
Tue, 4 Jul 2017 01:08:55 +0000 (01:08 +0000)
commit66d32c5e06738f851ce0a00d519a9481b52922e9
tree9f4e6ca67e6c9614866085215ff6d9c34beff16d
parent61118e7ecd648b9faf01b4febd541305b94730c8
[legalize-types] Clean up softening machinery.

The patch makes SoftenFloatResult/Operand logic just the same as all other legalization routines have: SoftenFloatResult() now fills the SoftenFloats map and SoftenFloatOperand() perform all needed replacements. This prevents softening mashinery from leaving stale entries in SoftenFloats map (that resulted in errors during the legalize type checking) and clarifies softening. The patch replaces https://reviews.llvm.org/D29265.

Differential Revision: https://reviews.llvm.org/D31946

llvm-svn: 307053
llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
llvm/test/CodeGen/X86/soft-fp-legal-in-HW-reg.ll [new file with mode: 0644]