On Thu, 2022-11-10 at 14:41 +0800, Lulu Cheng wrote:
> 
> 在 2022/11/9 下午9:53, Xi Ruoyao 写道:
> > +;; Convert floating-point numbers to integers
> > +(define_insn "<lrint_pattern><ANYF:mode><ANYFI:mode>2"
> > +  [(set (match_operand:ANYFI 0 "register_operand" "=f")
> > +       (unspec:ANYFI [(match_operand:ANYF 1 "register_operand"
> > "f")]
> > +                     LRINT))]
> > +  "TARGET_HARD_FLOAT &&
> > +   (<lrint_allow_inexact>
> > +    || flag_fp_int_builtin_inexact
> > +    || !flag_trapping_math)"
> > 
> +    || !flag_trapping_math
> 
> I think this condition is backwards.

I copied the logic from aarch64.md:6702.

Joseph: can you confirm that -ftrapping-math allows floor and ceil to
raise inexact exception?  The man page currently says:

The default is -ffp-int-builtin-inexact, allowing the exception to be
raised, unless C2X or a later C standard is selected.  This option does 
                                                       ^^^^^^^^^^^
nothing unless -ftrapping-math is in effect.

To me it's not very clear that "this option" stands for -fno-fp-int-
builtin-inexact or -ffp-int-builtin-inexact.

-- 
Xi Ruoyao <xry...@xry111.site>
School of Aerospace Science and Technology, Xidian University

Reply via email to