OSDN Git Service

Merging r339536:
authorHans Wennborg <hans@hanshq.net>
Thu, 16 Aug 2018 10:02:47 +0000 (10:02 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 16 Aug 2018 10:02:47 +0000 (10:02 +0000)
commitf6ce3c5c94ddedf5dbef94130295c0186dbe08ce
treee334059f718c0d7f4d98d944dd52a9066cbce30e
parentbb6ad8143cde5566fef794ca1cc47409b1a6c872
Merging r339536:
------------------------------------------------------------------------
r339536 | ctopper | 2018-08-13 08:53:49 +0200 (Mon, 13 Aug 2018) | 3 lines

[SelectionDAG] In PromoteFloatOp_BITCAST, insert a bitcast after the fp_to_fp16 in case the result type isn't a scalar integer.

This is another variation of PR38533. In this case, the result type of the bitcast is legal and 16-bits wide, but not a scalar integer. So we need to emit the convert to i16 and then bitcast it to the true result type. This new bitcast will be further type legalized if necessary.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@339857 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
test/CodeGen/X86/pr38533.ll