Override TargetOptions for block of code?

Hi, we generally run our JIT with UnsafeFPMath enabled, but there are a few specific instances where a block of code needs to follow strict FPMath. Is there a way to temporarily override TargetOptions for a specific block of IR?

Hi, Jason,

You shouldn’t need to use UsafeFPMath at all now. Instead, use fast-math flags on the relevant instructions. See:


Is there any way to provide the inverse? Ie, fast math enabled by default, but disable rcp using the flags for a specific div?

No, but you can enable fast-math flags by default in the IRBuilder (by calling setFastMathFlags). Â -Hal