]> granicus.if.org Git - llvm/commit
[AArch64] Fix incorrect CSEL node created
authorRoger Ferrer Ibanez <roger.ferreribanez@arm.com>
Tue, 8 Nov 2016 13:34:41 +0000 (13:34 +0000)
committerRoger Ferrer Ibanez <roger.ferreribanez@arm.com>
Tue, 8 Nov 2016 13:34:41 +0000 (13:34 +0000)
commitb576a606d40d2a28b671751b05a37af9401c5d85
treed09932d962ff16d931a0ce635393db4655ac16b6
parent00b1a65d849bcf49edbc8d85e720991a3a2efd3d
[AArch64] Fix incorrect CSEL node created

Under -enable-unsafe-fp-math, SELECT_CC lowering in AArch64
transforms floating point comparisons of the form "a == 0.0 ? 0.0 : x" to
"a == 0.0 ? a : x". But it incorrectly assumes that 'x' and 'a' have
the same type which can lead to a wrong CSEL node that crashes later
due to nonsensical copies.

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

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