[ARM] Fix instruction selection for ARMISD::CMOV with f16 type
authorVictor Campos <Victor.Campos@arm.com>
Tue, 19 Nov 2019 09:55:16 +0000 (09:55 +0000)
committerVictor Campos <Victor.Campos@arm.com>
Fri, 29 Nov 2019 10:40:37 +0000 (10:40 +0000)
commite478385e7708d0bcef43559651e6d62e387a507a
tree804b559f8cf81a6ba993ba88242d6509a922ec30
parente702bdb8598fcb4224f465569e7692a155c3eb3e
[ARM] Fix instruction selection for ARMISD::CMOV with f16 type

Summary:
In the cases where the CMOV (f16) SDNode is used with condition codes
LT, LE, VC or NE, it is successfully selected into a VSEL instruction.

In the remaining cases, however, instruction selection fails since VSEL
does not support other condition codes.

This patch handles such cases by using the single-precision version of
the VMOV instruction.

Reviewers: ostannard, dmgreen

Reviewed By: dmgreen

Subscribers: kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70667
llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
llvm/lib/Target/ARM/ARMInstrVFP.td
llvm/test/CodeGen/ARM/cmov_fp16.ll [new file with mode: 0644]