[PATCH] MergeFuncs should handle dynamic GEPs
peter_cooper at apple.com
Mon Feb 9 13:04:48 PST 2015
Ah, sorry about that. I forgot you were waiting on me. I was about to ping this :)
Updated code to handle non-splat vector constants.
I actually reordered a bunch of stuff here so that we detect early if the GEPs have identical types and operands, and can just return on that case. If that fails, we check for a DataLayout, and if we have one we do the offset checking for dynamic offsets. If we fail to find a splat constant, then at that point we know the GEPs weren't identical so we just use their types to order them which is what would have happened in the code prior to this patch.
I added a new test case in gep2.ll which checks that 2 vector GEPs with different non-splat constants don't merge. Before I made this fix that test would fire the assert you spotted.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 13890 bytes
Desc: not available
More information about the llvm-commits