[SelectionDAG] In PromoteFloatOp_BITCAST, insert a bitcast after the fp_to_fp16 in...
authorCraig Topper <craig.topper@intel.com>
Mon, 13 Aug 2018 06:53:49 +0000 (06:53 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 13 Aug 2018 06:53:49 +0000 (06:53 +0000)
commitcacf12a149a2d013acfd560aba46b271c1dc860b
tree2868511714c7edeb42d6d47fad305964090cb1af
parente42a15953750ee9cc666c300cefaa944af21b436
[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.

llvm-svn: 339536
llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
llvm/test/CodeGen/X86/pr38533.ll