As discussed in the post-commit thread for:
rL330437 ( http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20180423/545906.html )
We need a way to opt-out of a float-to-int-to-float cast optimization because too much existing code relies on the platform-specific undefined result of those casts when the float-to-int overflows.
I speculatively committed the LLVM changes associated with adding this function attribute, but I'll change the name/implementation if there's a better alternative:
rL330947
rL330950
rL330951
Also as suggested, I changed the LLVM doc to mention the specific sanitizer flag that catches this problem:
rL330958
I tested the end-to-end results on x86 and see the expected outcome: 'roundss' is no longer produced in place of cvttss2si + cvtsi2ss with default optimization.