spatel added inline comments.

================
Comment at: test/CodeGen/no-junk-ftrunc.c:1
+// RUN: %clang_cc1 -S -ffp-cast-overflow-workaround %s -emit-llvm -o - | 
FileCheck %s
+
----------------
lebedev.ri wrote:
> For a good measure, i'd add one more `RUN` line to test that it is currently 
> the default.
> (Yes, i noticed that it is already tested in `test/Driver/fast-math.c`)
The driver alone is handling the default setting, so it passes this flag to the 
front-end only when we're going to disable the transform. Ie, the driver eats 
"-fno-fp-cast-overflow-workaround" and sends nothing in that case to the 
front-end. 

So there's not currently any case where the function attribute will be 
"fp-cast-overflow-workaround=false", but I left that as a possibility in case 
we decide to lift the limit at a finer granularity (scalar vs. vector etc).

I may be misunderstanding the question/suggestion - do we want the front-end to 
independently have a default setting?


https://reviews.llvm.org/D46135



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

Reply via email to