]> granicus.if.org Git - llvm/commit
[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)
commitd9b006378089bcf570ae93d85b467010e33afff2
treeccaf28c0887bff4b8ceb2d2cbfa818a3362ebc8f
parentc6b8aca5b5773f8cbc7c0dfde1c4c69b5f8553e4
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284531 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
test/CodeGen/AArch64/fcsel-zero.ll [new file with mode: 0644]