Do a better and more complete job of preserving metadata when combining
authorChandler Carruth <chandlerc@gmail.com>
Sun, 19 Oct 2014 10:46:46 +0000 (10:46 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 19 Oct 2014 10:46:46 +0000 (10:46 +0000)
commitbc6378defb217d70d8627c64279c05b2154a4c0f
tree298d55d7341852526f9f3032f630b3d57d832469
parent5b8cd2f73ce873c656e5cb4ebf3f6efececb780e
Do a better and more complete job of preserving metadata when combining
loads.

This handles many more cases than just the AA metadata, some of them
suggested by Hal in his review of the AA metadata handling patch. I've
tried to test this behavior where tractable to do so.

I'll point out that I have specifically *not* included a test for
debuginfo because it was going to require 2 or 3 times as much work to
craft some input which would survive the "helpful" stripping of debug
info metadata that doesn't match the desired schema. This is another
good example of why the current state of write-ability for our debug
info metadata is unacceptable. I spent over 30 minutes trying to conjure
some test case that would survive, even copying from other debug info
tests, but it always failed to survive with no explanation of why or how
I might fix it. =[

llvm-svn: 220165
llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
llvm/test/Transforms/InstCombine/loadstore-aa-metadata.ll [deleted file]
llvm/test/Transforms/InstCombine/loadstore-metadata.ll [new file with mode: 0644]