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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 7 05:23:20 PST 2021


spatel added a comment.

In D96098#2546745 <https://reviews.llvm.org/D96098#2546745>, @RKSimon wrote:

> In D96098#2545584 <https://reviews.llvm.org/D96098#2545584>, @craig.topper wrote:
>
>> In D96098#2545540 <https://reviews.llvm.org/D96098#2545540>, @RKSimon wrote:
>>
>>> LGTM but I'd be happier if you can add a test case
>>
>> The use of that flag that I know of is to combine (fpext (fpround X, 1)) -> X if the type doesn't change. Since the FP_ROUND is being consumed by an expanded FCOPYSIGN after this, there won't be a fpext consuming it. Can you think of any other places it is used?
>
> No sorry @spatel do you know ?

No, I don't know the history either.
I don't see any other uses of that extra param, so it might be possible to drop it completely? A potential complication is that we don't have fast-math-flags on all FP casts, so there may be some FP narrowing optimizations that are missed.


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