[PATCH] D96098: [X86] Don't pass a 1 to the secon argument of ISD::FP_ROUND in LowerFCOPYSIGN.

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 00:09:40 PST 2021


pengfei added a comment.

In D96098#2544246 <https://reviews.llvm.org/D96098#2544246>, @craig.topper wrote:

> In D96098#2544235 <https://reviews.llvm.org/D96098#2544235>, @pengfei wrote:
>
>> LGTM. But if there's benefit for optimization if we use 1 here?
>
> We're reconstructing an FP_ROUND that was removed by DAGCombine:visitFCOPYSIGN. DAGCombine didn't check the second operand before doing the combine. So we have to do the conservative thing when reconstructing it. I'm not sure how to retain the information unless we also add the operand to FCOPYSIGN.

Then why we need to do these FP_ROUND/FP_EXTEND things. I didn't find any cases in LangRef and tests that the type of Sign is different from Mag or result.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96098



More information about the llvm-commits mailing list