[AArch64] Avoid materializing 0.0 when generating FP SELECT
authorEvandro Menezes <e.menezes@samsung.com>
Tue, 18 Oct 2016 20:37:35 +0000 (20:37 +0000)
committerEvandro Menezes <e.menezes@samsung.com>
Tue, 18 Oct 2016 20:37:35 +0000 (20:37 +0000)
commitce8d60156c2bd6754f760cd0186017ae6af6ee0a
treedafb113db9e33b7b38a8ff7e0a499548e2f8ef11
parentfccb5128b2019ee8fcb0acd4d00143ce14f008af
[AArch64] Avoid materializing 0.0 when generating FP SELECT

Transform `a == 0.0 ? 0.0 : x` to `a == 0.0 ? a : x` and `a != 0.0 ? x : 0.0`
to `a != 0.0 ? x : a` to avoid materializing 0.0 for FCSEL, since it does not
have to be materialized beforehand for FCMP, as it has a form that has 0.0
as an implicit operand.

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

llvm-svn: 284531
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/fcsel-zero.ll [new file with mode: 0644]