[LLVMdev] FW: Help understanding r127440

Joe Abbey jabbey at arxan.com
Mon Jul 11 13:06:09 PDT 2011


It appears Mr. Cheng may be busy, so perhaps someone here knows?


I've been debugging a code generator bug that surfaced while trying to
build tinyXML for ARM with LLVM 2.8.  The bug seems to originate in
DAGCombiner.  LLVM 2.9 still has this bug, but top of trunk does not.
To narrow down what change fixed it, I've used a binary search of
revisions from 2.9 to top of trunk.  The bytecode compiles once I back
ported r127440 to LLVM 2.8.  Hurray!  But I don't understand why it
fixes my bug.


I'd love to know more.  Especially, I'd like to produce a C/C++ snippet
which repros the problem on a small scale.


Your revision description indicates "Avoid replacing the value of a
directly stored load with the stored value if the load is indexed.


I've tried a variety of weird pointer manipulations like those found in
tinyXML e.g. *p = *(p + 1), *(p+1) = *p.  But none of my attempts seem
to get it to fail the way my input bytecode failed.


I'm trying to understand what 2011-03-10-DAGCombineCrash.ll is testing,
and I don't really fully read LLVM bytecode yet.  If it is possible,
could you'd be so kind as to share a C/C++ snippet?  Or if you have the
time, maybe share with me how the fix addresses the bug, and what the
original bug was.  I don't believe I have any visibility into


Attached is the bytecode which will break LLVM 2.8 - 2.9 with:


Stack dump:
0.      Program arguments: llc libtinyxml.so.bc

1.      Running pass 'Function Pass Manager' on module

2.      Running pass 'ARM Instruction Selection' on function


Program llc died with signal 6


Thanks for your help!!




Joe Abbey

Software Architect

Arxan Technologies, Inc.

1305 Cumberland Ave, Ste 215

West Lafayette, IN 47906

W: 765-889-4756 x2

C: 765-464-9893

jabbey at arxan.com

www.arxan.com <http://www.arxan.com/> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110711/ec97ee95/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libtinyxml.so.bc
Type: application/octet-stream
Size: 104732 bytes
Desc: libtinyxml.so.bc
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110711/ec97ee95/attachment.obj>

More information about the llvm-dev mailing list