[AArch64] Remove SETCC of CSEL when the latter's condition can be inverted
authorBradley Smith <bradley.smith@arm.com>
Thu, 27 May 2021 12:59:06 +0000 (13:59 +0100)
committerBradley Smith <bradley.smith@arm.com>
Fri, 4 Jun 2021 14:53:21 +0000 (15:53 +0100)
commita85f5874e2a4d4bad8c53d277e9df183122793ae
tree87d1bb57f83558397e8669a8dbdfc49ca3ba9aa7
parente789efc92a5aa6495a22bd3a93a03f640dc2f32a
[AArch64] Remove SETCC of CSEL when the latter's condition can be inverted

  setcc (csel 0, 1, cond, X), 1, ne ==> csel 0, 1, !cond, X

Where X is a condition code setting instruction.

Co-authored-by: Paul Walker <paul.walker@arm.com>
Differential Revision: https://reviews.llvm.org/D103256
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/sve-setcc.ll