[PATCH] D122589: Additionally set f32 mode with denormal-fp-math

David Candler via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 30 09:35:56 PDT 2022


dcandler added a comment.

The issue I found was trying to use getDefaultDenormalModeForType during constant folding to account for denormals (https://reviews.llvm.org/D116952). Setting denormal-fp-math to a non-IEEE mode without specifying denormal-fp-math-f32 still results in the denormal-fp-math-f32 attribute being present (even if unsued elsewhere), which leads to the wrong result for targets that do not support denormal-fp-math-f32.

Only emitting denormal-fp-math-f32 when specified makes sense, but the current default effectively always specifies it as IEEE. One alternative would be to simply change the default.


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

https://reviews.llvm.org/D122589



More information about the cfe-commits mailing list