[PATCH] Builtin fadd variants folding implementation

2019-09-11 Thread Tejas Joshi
Hi. This patch includes implementation of fadd, faddl, daddl functions. The patch boostraps on x86_64-linux-gnu and passes regression tests. Thanks, Tejas gcc/ChangeLog: 2019-09-11 Tejas Joshi * builtin-types.def: Define narrowing function types. * builtins.def: Define fadd variants

Re: [PATCH] builtin fadd variants implementation

2019-09-09 Thread Tejas Joshi
Hello. I am using real_isfinite to check for overflow conditions. How should I check for underflow? I have tried different ways but they contradicted other cases to pass. static bool fold_const_narrow_binary (real_value *result, const real_value *arg0, int icode, const real_value

Re: [PATCH] builtin fadd variants implementation

2019-09-02 Thread Tejas Joshi
Hello. Should a result like 1.4 be considered as inexact if truncating (narrowing?) from double to float? (due to loss of trailing bits) Comments of real_arithmetic says that it returns TRUE if the result is inexact. There's another function, exact_real_truncate which returns TRUE if truncation is

Re: [PATCH] builtin fadd variants implementation

2019-08-25 Thread Tejas Joshi
sible. Thanks, Tejas On Wed, 21 Aug 2019 at 22:25, Joseph Myers wrote: > > On Thu, 8 Aug 2019, Tejas Joshi wrote: > > > +/* Try to evaluate: > > + > > + *RESULT = fadd (*ARG0, *ARG1) > > + > > + in format FORMAT. Return true on success. */ &

Re: [PATCH] Builtin function roundeven folding implementation

2019-08-25 Thread Tejas Joshi
Hi. This is the full patch for roundeven folding. The patch bootstraps and passes regression tests. 2019-08-25 Tejas Joshi Martin Jambor * builtins.c (mathfn_built_in_2): Added CASE_MATHFN_FLOATN for ROUNDEVEN. * builtins.def: Added function definitions

Re: [PATCH] Builtin function roundeven folding implementation

2019-08-22 Thread Tejas Joshi
Hi, This is a full patch for the roundeven variants along with documentation and additional testcases. The following code also conforms to GNU's coding standards. Thanks, Tejas 2019-08-22 Tejas Joshi Martin Jambor * builtins.c (mathfn_built_in_2): Added CASE_MATHFN

Re: [PATCH] Builtin function roundeven folding implementation

2019-08-13 Thread Tejas Joshi
rather than CASE_MATHFN for roundeven is corrected in i386 expansion patch. Thanks, Tejas gcc/ChangeLog: 2019-06-12 Tejas Joshi * builtins.c (mathfn_built_in_2): Added CASE_MATHFN for ROUNDEVEN. * builtins.def: Added function definitions for roundeven function variants

[PATCH] builtin fadd variants implementation

2019-08-08 Thread Tejas Joshi
Hi. This patch includes fadd variants implementation for folding. The patch bootstraps and survives regression tests on x86_64-linux-gnu. Thanks, Tejas gcc/ChangeLog: 2019-08-08 Tejas Joshi * builtin-types.def: New function type variable arguments. * builtins.def: New function

Re: [PATCH] i386: Roundeven expansion for SSE4.1+

2019-07-30 Thread Tejas Joshi
hanged the file names to: * gcc.target/i386/sse4_1-round-roundeven-1.c: New test. * gcc.target/i386/sse4_1-round-roundeven-2.c: New test. Thanks, Tejas On Wed, 31 Jul 2019 at 11:26, Tejas Joshi wrote: > > Previous mail got sent to your mail only. Will send on mailing list. > Sorry f

[PATCH] i386: Roundeven expansion for SSE4.1+

2019-07-24 Thread Tejas Joshi
on top of <https://gcc.gnu.org/ml/gcc-patches/2019-06/msg01828.html> Thanks, Tejas gcc/ChangeLog: 2019-07-24 Tejas Joshi * builtins.c (mathfn_built_in_2): Change CASE_MATHFN to CASE_MATHFN_FLOATN for roundeven. * config/i386/i386.c (ix86_i387_mode_needed): Add case I3

Re: [PATCH] i386: Expand roundeven for SSE4.1+

2019-07-21 Thread Tejas Joshi
Hi. Thanks for the heads up. I did successful bootstrap build and regression testing on x86_64-linux-gnu for the above patch and have the test summary diff for patched and unpatched versions, but I do not know if it has passed the regression test or not hence attaching the diff here. Thanks,

[PATCH] i386: Expand roundeven for SSE4.1+

2019-07-13 Thread Tejas Joshi
): New builtin function. * optabs.def (roundeven_optab): New optab. gcc/testsuite/ChangeLog: 2019-07-13 Tejas Joshi * gcc.target/i386/avx-vround-roundeven-1.c: New test. * gcc.target/i386/avx-vround-roundeven-2.c: New test. diff --git a/gcc/builtins.c b/gcc/builtins.c index 8ceb0

[PATCH] Builtin function roundeven folding implementation

2019-06-27 Thread Tejas Joshi
Hi. This patch includes implementation of new function roundeven along with two utility functions. The patch bootstraps on x86_64-linux-gnu and passes regression tests. Thanks, Tejas gcc/ChangeLog: 2019-06-12 Tejas Joshi * builtins.c (mathfn_built_in_2): Added CASE_MATHFN for ROUNDEVEN