[LLVMdev] FW: Help understanding r127440

Eli Friedman eli.friedman at gmail.com
Mon Jul 11 13:58:43 PDT 2011

On Mon, Jul 11, 2011 at 1:06 PM, Joe Abbey <jabbey at arxan.com> wrote:
> 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.

The quick summary of r127440 is just that indexed loads produce 3
results, and the transformation in question crashed before because
it's trying to replace three values with two.

The transformation affects constructs where there is a store
immediately followed by a load from the same location, where the load
optimized to update the operand register; it's sort of tricky to
trigger reliably with C code.

If you want to reduce your bit code, you can use bugpoint


More information about the llvm-dev mailing list