[AArch64] Handle vec4, vec8, vec16 *itofp for half
authorPirama Arumuga Nainar <pirama@google.com>
Thu, 23 Apr 2015 17:16:27 +0000 (17:16 +0000)
committerPirama Arumuga Nainar <pirama@google.com>
Thu, 23 Apr 2015 17:16:27 +0000 (17:16 +0000)
commitb7db5f28c5987747157d20c9303177b547090198
treed38f84e171965a14e803877726113ab0ab81cdeb
parentdefaf830f9a803fcc44e85c90b26542e38546a03
[AArch64] Handle vec4, vec8, vec16 *itofp for half

Summary:
Set operation action for SINT_TO_FP and UINT_TO_FP nodes with v4i32,
v8i8, v8i16 inputs to allow promotion of v4f16 results.

Add tests for sitofp and uitofp for vec4, vec8, vec16, and i8, i16, i32,
and i64 vectors.  Only missing tests are for v16i8 and v16i16 as the
shift operations are too complicated to write a proper check sequence.

The conversions from v4i64 to v4f16 do not depend on this patch - v4i64
is split and the conversion gets handled while lowering v2i64.  I am
adding a test here for completeness.

Reviewers: aemerson, rengolin, ab, jmolloy, srhines

Subscribers: rengolin, aemerson, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235609 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
test/CodeGen/AArch64/fp16-v16-instructions.ll [new file with mode: 0644]
test/CodeGen/AArch64/fp16-v4-instructions.ll
test/CodeGen/AArch64/fp16-v8-instructions.ll