[RISCV] Add isel patterns for fnmadd/fnmsub with an fneg on the second operand instea...
authorCraig Topper <craig.topper@sifive.com>
Thu, 5 Nov 2020 21:56:52 +0000 (13:56 -0800)
committerCraig Topper <craig.topper@sifive.com>
Thu, 5 Nov 2020 22:00:25 +0000 (14:00 -0800)
commitdefe11866a326491ee9767f84bb3f70cfc4f4bcb
tree9bc43e1372e9344d60c51ce0addc02042ee86d28
parent4a4f4f78cb96c3e144929a416a9ee4ab7b419607
[RISCV] Add isel patterns for fnmadd/fnmsub with an fneg on the second operand instead of the first.

The multiply part of FMA is commutable, but TargetSelectionDAG.td
doesn't have it marked as commutable so tablegen won't automatically
create the additional patterns.

So manually add commuted patterns.
llvm/lib/Target/RISCV/RISCVInstrInfoD.td
llvm/lib/Target/RISCV/RISCVInstrInfoF.td
llvm/test/CodeGen/RISCV/double-arith.ll
llvm/test/CodeGen/RISCV/float-arith.ll