[llvm] [KnownFPClass] Add tests for FTPZ|DAPZ and dynamic denormal modes (PR #227943)
Eric Ross via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 20:52:44 PDT 2026
================
@@ -119,12 +119,35 @@ define float @ret_sin_nosnan(float nofpclass(snan) %arg) {
define float @ret_cos_nosnan(float nofpclass(snan) %arg) {
; CHECK-LABEL: define nofpclass(snan inf) float @ret_cos_nosnan
; CHECK-SAME: (float nofpclass(snan) [[ARG:%.*]]) #[[ATTR1]] {
-; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf) float @llvm.cos.f32(float nofpclass(snan) [[ARG]]) #[[ATTR2]]
+; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf) float @llvm.cos.f32(float nofpclass(snan) [[ARG]]) #[[ATTR4]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.cos.f32(float %arg)
ret float %call
}
+define float @ret_sin_negsubnormal_mode_dynamic_dynamic(float nofpclass(nan inf zero psub norm) %arg0) #0 {
----------------
ZERICO2005 wrote:
The denormal mode is not relevant for `sin` or `tan` at the moment. Future improvements to `KnownFPClass` may allow it to distinguish `+-1.0`, which may permit a deduction where `sin` and `tan` are sign preserving if `|x| <= 1.0` (and `fcNegSubnormal` has a magnitude less than 1.0).
https://github.com/llvm/llvm-project/pull/227943
More information about the llvm-commits
mailing list