[PATCH] D129743: [GlobalISel] Change widenScalar of G_FCONSTANT to mutate into G_CONSTANT.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 02:25:04 PDT 2022


foad added a comment.

In D129743#3651128 <https://reviews.llvm.org/D129743#3651128>, @aemerson wrote:

> In D129743#3651111 <https://reviews.llvm.org/D129743#3651111>, @foad wrote:
>
>>> Widening a G_FCONSTANT by extending and then generating G_FPTRUNC doesn't produce the same result all the time.
>>
>> That's only a problem if you care about the bit pattern of NaNs, right? It should be OK for all non-NaN values.
>
> Yeah, but it seems better to handle this as a G_CONSTANT rather than have value dependent legalization.

Agreed, I wasn't suggesting to change anything, just trying to understand what the problem was.

I don't really understand why we have G_FCONSTANT in the first place. Also I don't really understand the concept of legalizing a constant.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129743



More information about the llvm-commits mailing list