[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 12 03:43:32 PDT 2020
fhahn created this revision.
fhahn added reviewers: dmgreen, t.p.northover, arsenm, efriedma.
Herald added subscribers: hiraditya, wdng.
Herald added a project: LLVM.
Currently LLVM crashes on the added tests, because it tries to create a
MCConstantExpr for floating point constants.
The constant expressions in the example are not folded at IR generation
time and require ConstantFoldConstant to fold them. The patch updates
emitGlobalConstantImpl to use emitGlobalConstant for floating point
constant expressions that can be folded to a ConstantFP.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D79775
Files:
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/test/CodeGen/AArch64/complex-float-constexpr-global-initializer.ll
llvm/test/CodeGen/X86/complex-float-constexpr-global-initializer.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79775.263394.patch
Type: text/x-patch
Size: 4822 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200512/79d694b7/attachment.bin>
More information about the llvm-commits
mailing list