Because some instructions will be optimized by the backend compiler,
the driver has to manually flush to zero to keep the result exact.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
ctx->family = family;
ctx->wave_size = wave_size;
ctx->ballot_mask_bits = ballot_mask_bits;
+ ctx->float_mode = float_mode;
ctx->module = ac_create_module(wave_size == 32 ? compiler->tm_wave32
: compiler->tm,
ctx->context);
unsigned wave_size;
unsigned ballot_mask_bits;
+ unsigned float_mode;
+
LLVMValueRef lds;
};
switch (float_mode) {
case AC_FLOAT_MODE_DEFAULT:
+ case AC_FLOAT_MODE_DENORM_FLUSH_TO_ZERO:
break;
case AC_FLOAT_MODE_NO_SIGNED_ZEROS_FP_MATH:
flags.setNoSignedZeros();
AC_FLOAT_MODE_DEFAULT,
AC_FLOAT_MODE_NO_SIGNED_ZEROS_FP_MATH,
AC_FLOAT_MODE_UNSAFE_FP_MATH,
+ AC_FLOAT_MODE_DENORM_FLUSH_TO_ZERO,
};
/* Per-thread persistent LLVM objects. */