Dan Gohman
2008-Feb-12 18:10 UTC
[LLVMdev] "make check" failures: leaq in fold-mul-lohi.ll, stride-nine-with-base-reg.ll, stride-reuse.ll
Hi Evan, In -relocation-model=static mode, those tests are now getting code like this leaq A, %rsi movss %xmm0, (%rsi,%rdx,4) instead of this: movss %xmm0, A(,%rdx,4) This is specifically what these tests were written to catch :-). Running them with -relocation-model=pic is hiding the real bug. Dan On Feb 11, 2008, at 11:22 PM, Evan Cheng wrote:> Fixed. Thanks. > > Evan > > On Feb 11, 2008, at 2:35 AM, Duncan Sands wrote: > >> I'm seeing the following failures with "make check" (x86-32 linux): >> >> FAIL: test/CodeGen/X86/fold-mul-lohi.ll >> Failed with exit(1) at line 2 >> while running: llvm-as < test/CodeGen/X86/fold-mul-lohi.ll | llc - >> march=x86-64 | not grep lea >> leaq B, %rsi >> leaq A, %r8 >> leaq P, %rsi >> child process exited abnormally >> FAIL: test/CodeGen/X86/stride-nine-with-base-reg.ll >> Failed with exit(1) at line 2 >> while running: llvm-as < test/CodeGen/X86/stride-nine-with-base- >> reg.ll | llc -march=x86-64 | not grep lea >> leaq B, %rdx >> leaq A, %r8 >> leaq P, %rdx >> child process exited abnormally >> FAIL: test/CodeGen/X86/stride-reuse.ll >> Failed with exit(1) at line 2 >> while running: llvm-as < test/CodeGen/X86/stride-reuse.ll | llc - >> march=x86-64 | not grep lea >> leaq B, %rsi >> leaq A, %rsi >> leaq P, %rsi >> child process exited abnormally >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Evan Cheng
2008-Feb-12 19:22 UTC
[LLVMdev] "make check" failures: leaq in fold-mul-lohi.ll, stride-nine-with-base-reg.ll, stride-reuse.ll
Fixed. However, I wonder if we are doing the right / smart codegen for static codegen. AMD64 ABI document seems to indicate rip relative addressing should be used even in this case (see page 38). You know about about Linux addressing mode than I do. Please check. Thanks, Evan On Feb 12, 2008, at 10:10 AM, Dan Gohman wrote:> Hi Evan, > > In -relocation-model=static mode, those tests are now getting > code like this > > leaq A, %rsi > movss %xmm0, (%rsi,%rdx,4) > > instead of this: > > movss %xmm0, A(,%rdx,4) > > This is specifically what these tests were written to catch :-). > Running them with -relocation-model=pic is hiding the real bug. > > Dan > > On Feb 11, 2008, at 11:22 PM, Evan Cheng wrote: > >> Fixed. Thanks. >> >> Evan >> >> On Feb 11, 2008, at 2:35 AM, Duncan Sands wrote: >> >>> I'm seeing the following failures with "make check" (x86-32 linux): >>> >>> FAIL: test/CodeGen/X86/fold-mul-lohi.ll >>> Failed with exit(1) at line 2 >>> while running: llvm-as < test/CodeGen/X86/fold-mul-lohi.ll | llc - >>> march=x86-64 | not grep lea >>> leaq B, %rsi >>> leaq A, %r8 >>> leaq P, %rsi >>> child process exited abnormally >>> FAIL: test/CodeGen/X86/stride-nine-with-base-reg.ll >>> Failed with exit(1) at line 2 >>> while running: llvm-as < test/CodeGen/X86/stride-nine-with-base- >>> reg.ll | llc -march=x86-64 | not grep lea >>> leaq B, %rdx >>> leaq A, %r8 >>> leaq P, %rdx >>> child process exited abnormally >>> FAIL: test/CodeGen/X86/stride-reuse.ll >>> Failed with exit(1) at line 2 >>> while running: llvm-as < test/CodeGen/X86/stride-reuse.ll | llc - >>> march=x86-64 | not grep lea >>> leaq B, %rsi >>> leaq A, %rsi >>> leaq P, %rsi >>> child process exited abnormally >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Dan Gohman
2008-Feb-12 19:48 UTC
[LLVMdev] "make check" failures: leaq in fold-mul-lohi.ll, stride-nine-with-base-reg.ll, stride-reuse.ll
Rip-relative addressing can't be used with an index register, so in cases where an index register is being used, the benefit of using rip-relative addressing in non-PIC modes is outweighed by the additional instructions and registers needed to do the index computations. The examples on page 38 don't have any cases with indicies :-). Dan On Feb 12, 2008, at 11:22 AM, Evan Cheng wrote:> Fixed. However, I wonder if we are doing the right / smart codegen for > static codegen. AMD64 ABI document seems to indicate rip relative > addressing should be used even in this case (see page 38). You know > about about Linux addressing mode than I do. Please check. > > Thanks, > > Evan > > On Feb 12, 2008, at 10:10 AM, Dan Gohman wrote: > >> Hi Evan, >> >> In -relocation-model=static mode, those tests are now getting >> code like this >> >> leaq A, %rsi >> movss %xmm0, (%rsi,%rdx,4) >> >> instead of this: >> >> movss %xmm0, A(,%rdx,4) >> >> This is specifically what these tests were written to catch :-). >> Running them with -relocation-model=pic is hiding the real bug. >> >> Dan >> >> On Feb 11, 2008, at 11:22 PM, Evan Cheng wrote: >> >>> Fixed. Thanks. >>> >>> Evan >>> >>> On Feb 11, 2008, at 2:35 AM, Duncan Sands wrote: >>> >>>> I'm seeing the following failures with "make check" (x86-32 linux): >>>> >>>> FAIL: test/CodeGen/X86/fold-mul-lohi.ll >>>> Failed with exit(1) at line 2 >>>> while running: llvm-as < test/CodeGen/X86/fold-mul-lohi.ll | llc - >>>> march=x86-64 | not grep lea >>>> leaq B, %rsi >>>> leaq A, %r8 >>>> leaq P, %rsi >>>> child process exited abnormally >>>> FAIL: test/CodeGen/X86/stride-nine-with-base-reg.ll >>>> Failed with exit(1) at line 2 >>>> while running: llvm-as < test/CodeGen/X86/stride-nine-with-base- >>>> reg.ll | llc -march=x86-64 | not grep lea >>>> leaq B, %rdx >>>> leaq A, %r8 >>>> leaq P, %rdx >>>> child process exited abnormally >>>> FAIL: test/CodeGen/X86/stride-reuse.ll >>>> Failed with exit(1) at line 2 >>>> while running: llvm-as < test/CodeGen/X86/stride-reuse.ll | llc - >>>> march=x86-64 | not grep lea >>>> leaq B, %rsi >>>> leaq A, %rsi >>>> leaq P, %rsi >>>> child process exited abnormally >>>> _______________________________________________ >>>> LLVM Developers mailing list >>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Apparently Analagous Threads
- [LLVMdev] "make check" failures: leaq in fold-mul-lohi.ll, stride-nine-with-base-reg.ll, stride-reuse.ll
- [LLVMdev] "make check" failures: leaq in fold-mul-lohi.ll, stride-nine-with-base-reg.ll, stride-reuse.ll
- [LLVMdev] "make check" failures: leaq in fold-mul-lohi.ll, stride-nine-with-base-reg.ll, stride-reuse.ll
- [LLVMdev] "equivalent" .ll files diverge after optimizations are applied
- [LLVMdev] "equivalent" .ll files diverge after optimizations are applied