Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

i386 make check failure: win_ftol2.ll fails on SVN r157887 #13115

Open Quuxplusone opened 12 years ago

Quuxplusone commented 12 years ago
Bugzilla Link PR13017
Status NEW
Importance P normal
Reported by Witold Baryluk (baryluk@smp.if.uj.edu.pl)
Reported on 2012-06-02 11:27:34 -0700
Last modified on 2013-05-28 23:53:55 -0700
Version trunk
Hardware All All
CC geek4civic@gmail.com, llvm-bugs@lists.llvm.org, mlsemon35@gmail.com, weezel@yahoo.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
I'm running on recent git commit 31219d2cec17dca632b6d047a15e86dc92b76e18

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157887 91177308-0d34-
0410-b5e6-96231b3b80d8

Compiled with

export CC='gcc-4.7'
export CXX='g++-4.7'
export CPP='cpp-4.7'
export CFLAGS="-march=pentium-m -O3 -mfpmath=sse -ftree-vectorize"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-Wl,-O1 -Wl,--as-needed"

/sctank2/Dane/linux/llvm/configure \
    --enable-optimized \
    --disable-assertions \
    --enable-bindings=none \
    --with-built-clang \
    --enable-shared \
    --enable-jit \
    --enable-targets=x86

(make && make check-all) 2>&1 | tee check-all-redir.log

A failure:

FAIL: LLVM :: CodeGen/X86/win_ftol2.ll (3183 of 6078)
******************** TEST 'LLVM :: CodeGen/X86/win_ftol2.ll' FAILED
********************
Script:
--
/sctank2/Dane/linux/llvm-builddir/Release/bin/llc <
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -mtriple=i686-pc-win32 |
/sctank2/Dane/linux/llvm-builddir/Release/bin/FileCheck
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -check-prefix=FTOL
/sctank2/Dane/linux/llvm-builddir/Release/bin/llc <
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -mtriple=i686-pc-mingw32
| /sctank2/Dane/linux/llvm-builddir/Release/bin/FileCheck
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -check-prefix=COMPILERRT
/sctank2/Dane/linux/llvm-builddir/Release/bin/llc <
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -mtriple=i686-pc-linux |
/sctank2/Dane/linux/llvm-builddir/Release/bin/FileCheck
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -check-prefix=COMPILERRT
/sctank2/Dane/linux/llvm-builddir/Release/bin/llc <
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -mtriple=x86_64-pc-win32
| /sctank2/Dane/linux/llvm-builddir/Release/bin/FileCheck
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -check-prefix=COMPILERRT
/sctank2/Dane/linux/llvm-builddir/Release/bin/llc <
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -mtriple=x86_64-pc-
mingw32 | /sctank2/Dane/linux/llvm-builddir/Release/bin/FileCheck
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -check-prefix=COMPILERRT
/sctank2/Dane/linux/llvm-builddir/Release/bin/llc <
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -mtriple=x86_64-pc-linux
| /sctank2/Dane/linux/llvm-builddir/Release/bin/FileCheck
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -check-prefix=COMPILERRT
/sctank2/Dane/linux/llvm-builddir/Release/bin/llc <
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -mattr=-sse -O0 -
mtriple=i686-pc-win32 | /sctank2/Dane/linux/llvm-builddir/Release/bin/FileCheck
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll -check-prefix=FTOL_2
--
Exit Code: 1
Command Output (stderr):
--
/sctank2/Dane/linux/llvm/test/CodeGen/X86/win_ftol2.ll:140:9: error: expected
string not found in input
; FTOL: @double_ui64_5
        ^
<stdin>:185:2: note: scanning from here
 movl %ebp, %esp
 ^
<stdin>:186:2: note: possible intended match here
 popl %ebp
 ^
--

********************

Only this single test is failing.

Thanks,
Witek
Quuxplusone commented 12 years ago
Could you confirm if the failure might be triggered by r157884?
Or could you try bisecting?

I have not seen any failures on CodeGen/X86/win_ftol2.ll for months.
Quuxplusone commented 11 years ago
I'm seeing the same check-all failure when building llvm and clang on Debian
wheezy (uname -a == Linux test 3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64
GNU/Linux) using gcc (--version == gcc (Debian 4.7.2-4) 4.7.2) configured with:
 ../llvm/configure --enable-targets=host --enable-optimized CC=gcc CXX=g++

This looks like the relevant bit of output from the 'llc < %s -mtriple=i686-pc-
win32 | FileCheck %s -check-prefix=FTOL' test:

   150  _double_ui32_5:                         # @double_ui32_5
   151  # BB#0:
   152      movsd   LCPI5_0, %xmm0
   153      movsd   4(%esp), %xmm1
   154      movapd  %xmm1, %xmm2
   155      subsd   %xmm0, %xmm2
   156      cvttsd2si   %xmm2, %ecx
   157      xorl    $-2147483648, %ecx      # imm = 0xFFFFFFFF80000000
   158      cvttsd2si   %xmm1, %eax
   159      ucomisd %xmm1, %xmm0
   160      cmovbel %ecx, %eax
   161      ret
   162
   163      .def     _double_ui64_5;
   164      .scl    2;
   165      .type   32;
   166      .endef
   167      .globl  _double_ui64_5
   168      .align  16, 0x90
   169  _double_ui64_5:                         # @double_ui64_5
   170  # BB#0:
   171      pushl   %ebp
   172      movl    %esp, %ebp
   173      andl    $-8, %esp
   174      subl    $16, %esp
   175      movsd   8(%ebp), %xmm0
   176      movsd   %xmm0, 8(%esp)
   177      fldl    8(%esp)
   178      calll   __ftol2
   179      movl    %ebp, %esp
   180      popl    %ebp
   181      ret
   182

It appears that actually the double_ui32_5 case is failing due to the expected
call to __ftol2 being replaced with inlined code. However, the double_ui32_5
case appears to succeed by matching the calll   __ftol2 appearing later in
_double_ui64_5.
Quuxplusone commented 11 years ago

What is the status of this bug? My PC might have this bug, and I describe the situation as "happens on Pentium III for Clang later than 3.1, on either Linux or FreeBSD, but does not seem to happen on Pentium 4." This test failure is a sign that later on, the resulting compiler makes programs that throw "Illegal instruction" errors on occasion. Is there a workaround? The closest I got was to compile for i586, but even that wasn't a 100% fix.

I haven't tried the latest SVN for almost two months, so let me know if a fix already made it there.

Thanks!

Michael

Quuxplusone commented 11 years ago
Michael, I guess r172983 might be a hint for you.
Could you tweak each RUN: line to add -mcpu=(specific processor) ?

-mcpu=host by default.
Quuxplusone commented 11 years ago
(In reply to comment #4)
> Michael, I guess r172983 might be a hint for you.
> Could you tweak each RUN: line to add -mcpu=(specific processor) ?
>
> -mcpu=host by default.

Sure.  If you want me to just compile one test, let me know the syntax.  The
way I'm running into this most often is to build Clang/LLVM using Clang.  I'm
happy to give the results to you, but to do so on a Pentium III takes time.
Additionally, if the build process thinks I have something newer than a 686 (I
think), the build fails somewhere around the LLVM tblgen program.  That might
be another hint.

I will download the latest Clang/LLVM SVN tonight and try the build again.

Thanks!

Michael