OSDN Git Service

[AArch64] Fix operation actions for FP16 vector intrinsics
authorBryan Chan <bryan.chan@huawei.com>
Thu, 10 Jan 2019 15:02:37 +0000 (15:02 +0000)
committerBryan Chan <bryan.chan@huawei.com>
Thu, 10 Jan 2019 15:02:37 +0000 (15:02 +0000)
commit595cc08b386094d7da807582701e661db860b3da
tree5e1eb75ff4e9f1570b7b7245a25f94e1f775f042
parent5482030e571f424b4c7068752e4147ff4d132da3
[AArch64] Fix operation actions for FP16 vector intrinsics

Summary:
This patch changes the legalization action for some half-precision floating-
point vector intrinsics (FSIN, FLOG, etc.) from Promote to Expand. These ops
are not supported in hardware for half-precision vectors, but promotion is
not always possible (for v8f16 operands). Changing the action to Expand fixes
an assertion failure in the legalizer when the frontend produces such ops.
In addition, a quick microbenchmark shows that, in the v4f16 case,
expanding introduces fewer spills and is therefore slightly faster than
promoting.

Reviewers: t.p.northover, SjoerdMeijer

Reviewed By: SjoerdMeijer

Subscribers: javed.absar, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350825 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
test/CodeGen/AArch64/arm64-vfloatintrinsics.ll