[LLVMbugs] [Bug 1505] NEW: wrong floating point code with mcpu=i686 (i.e. no sse)

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jun 11 12:24:55 PDT 2007


http://llvm.org/bugs/show_bug.cgi?id=1505

           Summary: wrong floating point code with mcpu=i686 (i.e. no sse)
           Product: new-bugs
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: baldrick at free.fr


The easiest way to see the problem is with lli (see below), but the same
happens if you build with llc.  If sse extensions are turned off (by using
-mcpu=i686) then wrong code is produced.  This is not a floating point
precision problem: if you run under valgrind then it reports the use of an
uninitialized value at each failure point.  If compiled with sse extensions
(which on my machine is what you get if you don't specify the cpu) then
valgrind does not complain and the program works correctly.  I tried to
reduce the testcase but bugpoint didn't come up with anything sensible,
and any changes that make it substantially smaller seem to make the problem
go away...

$ lli tc.bc

,.,. C34003A ACATS 2.5 07-06-11 21:17:30
---- C34003A CHECK THAT THE REQUIRED PREDEFINED OPERATIONS ARE DECLARED
                (IMPLICITLY) FOR DERIVED FLOATING POINT TYPES.
==== C34003A PASSED ============================.
$ lli -mcpu=i686 tc.bc

,.,. C34003A ACATS 2.5 07-06-11 21:17:53
---- C34003A CHECK THAT THE REQUIRED PREDEFINED OPERATIONS ARE DECLARED
                (IMPLICITLY) FOR DERIVED FLOATING POINT TYPES.
   * C34003A INCORRECT :=.
   * C34003A INCORRECT QUALIFICATION.
   * C34003A INCORRECT SELF CONVERSION.
   * C34003A INCORRECT CONVERSION TO PARENT.
   * C34003A INCORRECT CONVERSION TO INTEGER.
   * C34003A INCORRECT CONVERSION TO FLOAT.
   * C34003A INCORRECT CONVERSION TO FIXED.
   * C34003A INCORRECT IMPLICIT CONVERSION.
   * C34003A INCORRECT REAL LITERAL.
   * C34003A INCORRECT =.
   * C34003A INCORRECT <=.
   * C34003A INCORRECT >=.
   * C34003A INCORRECT UNARY +.
   * C34003A INCORRECT UNARY -.
   * C34003A INCORRECT ABS.
   * C34003A INCORRECT BINARY +.
   * C34003A INCORRECT BINARY -.
   * C34003A INCORRECT *.
   * C34003A INCORRECT /.
   * C34003A INCORRECT **.
**** C34003A FAILED ****************************.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list