[PATCH] D71373: [ConstantFolding] Disable constant folding for bitcasts to x86_fp80
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 11 12:55:47 PST 2019
efriedma added a comment.
Is this really the only place where we fold fp80 bitcasts? I guess it might be.
Would it make sense to allow encoding these non-canonical values into an APFloat? (Still treating it as a NaN, but keeping around enough information to reconstitute it if bitcastToAPInt is called.) If we don't think that's worthwhile, this seems like the right approach.
> We could maybe be smarter and look at the value we're going to convert and make sure its safe
I'm a little concerned this might show up in more cases than you expect, where we end up with a bitcast in code that isn't explicitly reintepreting floats. For example, in code using C unions.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71373/new/
https://reviews.llvm.org/D71373
More information about the llvm-commits
mailing list