[PATCH] D79775: [AsmPrinter] Handle foldable FP constant exprs in initializers.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 19 14:19:03 PDT 2020
fhahn abandoned this revision.
fhahn added a comment.
In D79775#2034646 <https://reviews.llvm.org/D79775#2034646>, @efriedma wrote:
> > Hm, the version I am looking at seems to only return true for GlobalValues & block addresses in functions needing relocations. https://github.com/llvm/llvm-project/blob/master/llvm/lib/IR/Constants.cpp#L553
>
> Oh, hmm, somehow I thought it was different.
>
> We probably need some common helper that actually does what we want, somewhere, so we don't have duplicate code for figuring out whether it's legal to promote a constant to a global.
Thanks for pointing me in the right direction! I've submitted a fix directly to AArch64PromoteConstant (824a8593328c <https://reviews.llvm.org/rG824a8593328cb076e509f9a03e80ac681e52605e>) rather than modifying AsmPrinter. I'll potentially follow up on the AArch64PromoteConstant patch with another one that tries to simplify constant expressions before deciding in the pass.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79775/new/
https://reviews.llvm.org/D79775
More information about the llvm-commits
mailing list