Currently the AsmPrinter cannot emit some floating point constant
expressions in global initializers. Avoid generating them.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp | ||
---|---|---|
567–570 | I would rather extend the check here to make it recursive: in addition to restricting ConstantExprs, restrict ConstantAggregates that contain a ConstantExpr or GlobalValue. Or just call Constant::needsRelocation(). |
llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp | ||
---|---|---|
567–570 | Done, I've changed containsFloatConstantExpr to containsOnlyConstantData which traverses ConstantAggregates. |
I would rather extend the check here to make it recursive: in addition to restricting ConstantExprs, restrict ConstantAggregates that contain a ConstantExpr or GlobalValue. Or just call Constant::needsRelocation().