Open Quuxplusone opened 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 |
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.
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.
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
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.
(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