[PATCH] D96037: [DAGCombiner] Don't fold FCOPYSIGN vector sign operand casts

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 07:49:33 PST 2021


luismarques added a comment.

In D96037#2542137 <https://reviews.llvm.org/D96037#2542137>, @frasercrmck wrote:

> FWIW, something this would likely help with D96028 <https://reviews.llvm.org/D96028>, as RVV doesn't benefit from this fpextend/fptrunc folding. We have to undo it in the custom-lowering and use a custom-node to prevent infinite loops. I was wondering if the combiner should ask the target whether it's beneficial to fold the ext/trunc or not?

I did propose that in the past: https://reviews.llvm.org/D66725
I may have misunderstood the review feedback I got back then (spread over a variety of patches and personal email), but that feedback led to me abandoning that patch.
I think part of the problem, at the time, was that my patches stressed too much the issues around the legality of the operation/operands, and not enough about the combine being desirable.
When I re-analyzed this issue, before submitting this patch, it did seem to me that a hook would still be beneficial, even if many of the original problems had since been addressed by other means.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96037/new/

https://reviews.llvm.org/D96037



More information about the llvm-commits mailing list