Commit aa9cb1c
[RISCV] Teach RISCVTargetLowering::isFPImmLegal about fli+fneg (llvm#149075)
There was a mismatch between isFPImmlegal and the cases that are handled
by lowerConstantFP. isFPImmLegal didn't check for the case where we
support `fli` of a negated constant (and so can lower to fli+fneg). This
has very minimal impact (42 insertion, 47 deletions across an
rv22u64_zfa llvm-test-suite build including SPEC CPU 2017) but is added
here for completeness.
See the PR thread llvm#149075 for furrther discussion about the degree to which isFPImmLegal and lowerConstantFP are consistent. We ultimately agreed it makes sense to add fli+fneg, but there may be other future cases where it doesn't make sense to match.1 parent cd8728c commit aa9cb1c
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2319 | 2319 | | |
2320 | 2320 | | |
2321 | 2321 | | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
2322 | 2326 | | |
2323 | 2327 | | |
2324 | 2328 | | |
| |||
0 commit comments