[RISCV] Handle fcopysign(f32, f64) and fcopysign(f64, f32)
authorLuís Marques <luismarques@lowrisc.org>
Tue, 26 Nov 2019 14:24:59 +0000 (14:24 +0000)
committerLuís Marques <luismarques@lowrisc.org>
Tue, 26 Nov 2019 14:26:31 +0000 (14:26 +0000)
commitd7be3eab5c0e1598e919973ed68a200997a4734a
tree89b94256d99a5e7f431a5f27082f46700803f571
parentd88f67bdca7526c2adc3749bb2cfef6b32da971c
[RISCV] Handle fcopysign(f32, f64) and fcopysign(f64, f32)

Summary: Adds tablegen patterns to explicitly handle fcopysign where the
magnitude and sign arguments have different types, due to the sign value casts
being removed the by DAGCombiner. Support for RV32IF follows in a separate
commit. Adds tests for all relevant scenarios except RV32IF.

Reviewers: lenary
Reviewed By: lenary
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70678
llvm/lib/Target/RISCV/RISCVInstrInfoD.td
llvm/test/CodeGen/RISCV/copysign-casts.ll [new file with mode: 0644]