Do not ASSERTZEXT for i16 result of bitcast from f16 operand
authorPirama Arumuga Nainar <pirama@google.com>
Fri, 8 Jan 2016 17:46:05 +0000 (17:46 +0000)
committerPirama Arumuga Nainar <pirama@google.com>
Fri, 8 Jan 2016 17:46:05 +0000 (17:46 +0000)
commit0de8d7820f74ed70d2b737406be353e641d3e9f9
tree7862515feff4fefdeabd1b12cd0e84038c53bc3f
parentdc706797f99edce4335866facb9a3d8b95028201
Do not ASSERTZEXT for i16 result of bitcast from f16 operand

Summary:
During legalization if i16, do not ASSERTZEXT the result of FP_TO_FP16.
Directly return an FP_TO_FP16 node with return type as the
promote-to-type of i16.

This patch also removes extraneous length check.  This legalization
should be valid even if integer and float types are of different
lengths.

This patch breaks a hard-float test for fp16 args.  The test is changed
to allow a vmov to zero-out the top bits, and also ensure that the
return value is in an FP register.

Reviewers: ab, jmolloy

Subscribers: srhines, llvm-commits

Differential Revision: http://reviews.llvm.org/D15438

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257184 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
test/CodeGen/ARM/fp16-args.ll
test/CodeGen/ARM/fp16-v3.ll [new file with mode: 0644]