[ARM] Fold floating point select(binop) patterns
authorDavid Green <david.green@arm.com>
Wed, 24 Nov 2021 10:22:20 +0000 (10:22 +0000)
committerDavid Green <david.green@arm.com>
Wed, 24 Nov 2021 10:22:20 +0000 (10:22 +0000)
commitd9af9c2c5a53c9ba6aa0255240a2a40e8bea27aa
tree8ea9aaabfcb2209f1f851dd892170873938c1efe
parent764b35d89f57a9052d84898422a865dc2e08edca
[ARM] Fold floating point select(binop) patterns

Similar to D84091 which added extra predicated folds for integer operations
using the identity element of the operation, this adds them for floating
point operations for the form `BinOp(x, select(p, y, Identity))`. They are
folded back to predicated versions of the operator, with fadd having the
identity -0.0, fsub using the identity 0.0 and fmul using 1.0.

Differential Revision: https://reviews.llvm.org/D113574
llvm/lib/Target/ARM/ARMInstrMVE.td
llvm/test/CodeGen/Thumb2/mve-pred-selectop3.ll