hfinkel added a comment.

I'm fine with setting these for consistency, but I don't understand why our 
failure to do this would cause problems. If you look in lib/CodeGen/CGCall.cpp 
and you'll see:

  if (!CodeGenOpts.FPDenormalMode.empty())
    FuncAttrs.addAttribute("denormal-fp-math",
                           CodeGenOpts.FPDenormalMode);
  
  FuncAttrs.addAttribute("no-trapping-math",
                         llvm::toStringRef(CodeGenOpts.NoTrappingMath));
  FuncAttrs.addAttribute("no-infs-fp-math",

and the code in TargetMachine::resetTargetOptions in Target/TargetMachine.cpp 
has this:

  RESET_OPTION(NoTrappingFPMath, "no-trapping-math");
  
  StringRef Denormal =
    F.getFnAttribute("denormal-fp-math").getValueAsString();
  if (Denormal == "ieee")
    Options.FPDenormalType = FPDenormal::IEEE;
  else if (Denormal == "preserve-sign")
    Options.FPDenormalType = FPDenormal::PreserveSign;
  else if (Denormal == "positive-zero")
    Options.FPDenormalType = FPDenormal::PositiveZero;

so this should all work regardless.

Also, please post your patches with full context. Please see 
http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface 
for instructions.


https://reviews.llvm.org/D24909



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to