zahiraam added a comment.

>> I'm not following entirely, but -funsafe-math-optimizations is just a subset 
>> of -ffast-math, so checking only the properties that contribute to 
>> -funsafe-math-optimizations should be enough. 
>>  I think it is way simpler to reason in these terms than enumerating all the 
>> possible scenarios.

Exactly my point Since -funsafe-math-optimizations is a subset of -ffast-math, 
shouldn't it be the "minimal" option to trigger the unsafe-fp-math attribute 
for functions? 
I agree with the second part of the condition; it should be
updated with (LangOpts.getDefaultFPContractMode() ==  
LangOptions::FPModeKind::FPM_Fast ||   LangOpts.getDefaultFPContractMode() == 
LangOptions::FPModeKind::FPM_FastHonorPragmas) 
but I am still hesitant about the change you are proposing for the first part 
of the condition.
@andrew.w.kaylor Can you please weigh in on this?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136786/new/

https://reviews.llvm.org/D136786

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

Reply via email to