Open Quuxplusone opened 14 years ago
Please attach:
1. Preprocessed C source
2. Bitcode
Thanks
The attachments didn't go through first. I have attached the C file and the llvm
generated asm file.
(In reply to comment #4)
> The attachments didn't go through first. I have attached the C file and the
> llvm
> generated asm file.
They are obviously useless to reproduce the problem
Attached test.c
(192 bytes, text/x-csrc): Test case
Attached preprocessed-test.c
(169 bytes, text/x-csrc): preprocessed test case
Attached test-llvm-ir.s
(1016 bytes, application/octet-stream): llvm bit code
Attached test.s
(373 bytes, application/octet-stream): Asm at -O2
Attached test-asm.s
(373 bytes, application/octet-stream): asm \
Attached test-asm.s
(373 bytes, application/octet-stream): Asm at -O2
Please see the attachments.
Thanks,
Rohit
looks like 2 separate bugs: optimization and codegen
As far as I can tell, arguments aren't being passed at all now. Here's a
simple program to add two numbers together:
int add(int a, int b) { return a+b; }
int main (void) { return add(5, 6); }
llc from March 16th produces this correct code to call add(a,b):
mov.w #5, r15
mov.w #6, r14
call #add
llc from a few minutes ago produces this incorrect code for the same call:
; no movs to r14,r15!
call #add
-ben
I did a little old-fashioned binary search between a known-broken revision number and a known-OK revision number; it seems that r98938 (http://llvm.org/viewvc/llvm-project?view=rev&revision=98938) broke this. On inspection I have no idea why, so I'll ask llvmdev.
(In reply to comment #13)
> I did a little old-fashioned binary search between a known-broken revision
> number and a known-OK revision number; it seems that r98938
> (http://llvm.org/viewvc/llvm-project?view=rev&revision=98938) broke this. On
> inspection I have no idea why, so I'll ask llvmdev.
Specifically, this one little change causes MSP430 argument passing to break:
http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?r1=98938&r2=98937&pathrev=98938
(In reply to comment #14)
> Specifically, this one little change causes MSP430 argument passing to break:
> http://llvm.org/viewvc/llvm-
project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?r1=98938&r2=98937&pathrev=98938
I gave up my search for a solution after slogging through some .td files and
not understanding them well enough. Nobody responded to my llvmdev query*, so
I assume there are too few embedded-software people on that list to care. I
reversed r98938 in my mirror of the LLVM repo, so this problem isn't especially
acute for me at the moment.
* http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-June/032349.html
Anton fixed my problem* and convinced me that it wasn't relevant to this
ticket, so I'll stop hijacking this ticket now.
* http://lists.ransford.org/pipermail/llvm-msp430/2010-June/000180.html
test.c
(192 bytes, text/x-csrc)test.s
(373 bytes, application/octet-stream)preprocessed-test.c
(169 bytes, text/x-csrc)test-llvm-ir.s
(1016 bytes, application/octet-stream)test-asm.s
(373 bytes, application/octet-stream)test-asm.s
(373 bytes, application/octet-stream)