[SelectionDAG] Improve support for promotion of <1 x fX> floating point argument...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 2 May 2017 10:33:08 +0000 (10:33 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 2 May 2017 10:33:08 +0000 (10:33 +0000)
commit89ad89cc73e3e713aaad6aa9ff98fd118573a0b7
tree87af5cc767bfdb5d26ce8cf111749eb92f5f604b
parent1c5550671dee51da58fb657a7b08c174f67089b0
[SelectionDAG] Improve support for promotion of <1 x fX> floating point argument types (PR31088)

PR31088 demonstrated that we were assuming that only integers require promotion from <1 x iX> types, when in fact float types may require it as well - in this case half floats.

This patch adds support for extension/truncation for both integer and float types.

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

llvm-svn: 301910
llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/test/CodeGen/NVPTX/f16-instructions.ll
llvm/test/CodeGen/X86/pr31088.ll