[PATCH] D69598: Work on cleaning up denormal mode handling
Sanjay Patel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 7 04:56:08 PST 2019
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM - see inline for some leftover naming diffs.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:1744-1745
FuncAttrs.addAttribute("null-pointer-is-valid", "true");
- if (!CodeGenOpts.FPDenormalMode.empty())
- FuncAttrs.addAttribute("denormal-fp-math", CodeGenOpts.FPDenormalMode);
+ if (CodeGenOpts.FPSubnormalMode != llvm::SubnormalMode::Invalid)
+ FuncAttrs.addAttribute("denormal-fp-math",
+ llvm::subnormalModeName(CodeGenOpts.FPSubnormalMode));
----------------
If I'm seeing it correctly, this can't build as-is? FPSubnormalMode is called FPDenormalMode in the header change above here.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:20469
ISD::NodeType SelOpcode = VT.isVector() ? ISD::VSELECT : ISD::SELECT;
- const Function &F = DAG.getMachineFunction().getFunction();
- Attribute Denorms = F.getFnAttribute("denormal-fp-math");
- if (Denorms.getValueAsString().equals("ieee")) {
+ DenormalMode SubnormMode = DAG.getDenormalMode(VT);
+ if (SubnormMode == DenormalMode::IEEE) {
----------------
SubnormMode -> DenormMode
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69598/new/
https://reviews.llvm.org/D69598
More information about the cfe-commits
mailing list