[PATCH] D103634: [BitcodeWriter][PowerPC] Avoid clearing lower bits for ppc_fp128 NullValues

Jinsong Ji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 3 11:17:08 PDT 2021


jsji added a comment.

In D103634#2796960 <https://reviews.llvm.org/D103634#2796960>, @efriedma wrote:

> If Constant::isNullValue() isn't returning the right result, please fix it directly.  Getting it wrong could have other unexpected consequences.

Thanks @efriedma for the comments.

In this case Constant::isNullValue() is correct, as the value is indeed a NullValue for ppc_fp128.
per definition of a long double  in  3.1.5. Extended Precision https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html

Yes, we will need to deal with this special cases carefully in other optimizations as well to avoid unexpected consequences.

The fix is for BitcodeWriters,  so that we won't end up clear bits unexpected, which causes unexpected different behaviors using bitcode vs. IR.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103634



More information about the llvm-commits mailing list