https://bugzilla.novell.com/show_bug.cgi?id=373269

User [EMAIL PROTECTED] added comment
https://bugzilla.novell.com/show_bug.cgi?id=373269#c6


Rodrigo Kumpera <[EMAIL PROTECTED]> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |[EMAIL 
PROTECTED]




--- Comment #6 from Rodrigo Kumpera <[EMAIL PROTECTED]>  2008-03-29 14:09:58 
MST ---
Mono can use SSE in 32bits mode, it's auto-detected at runtime. Math.Min only
works for u1, u2 and u4. We could use SSE for float and double, this would mean
a significant gain.


Testing this example revealed a bug in gmcs. It would choose the int version
over the uint version of Math.Min even if the type used is uint32.

The following code is wrongly compiled to use the int32 version of Math.Min:

using System;

class Program {
        const int LOOP_SIZE = 20; //Int16.MaxValue;
        static int Tst (uint a, uint b) 
        {
                return Math.Min (a,b);
        }

        static void Main ()
        {
                Console.WriteLine (Tst(1,2));
        }
}

We could optimize by using cmov for the other types, thou I'm not sure it would
be better than the current code.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to