GVN: Preserve invariant.load metadata
authorArnold Schwaighofer <aschwaighofer@apple.com>
Thu, 26 Jun 2014 19:51:19 +0000 (19:51 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Thu, 26 Jun 2014 19:51:19 +0000 (19:51 +0000)
commitc2d93c404820178d55f440d4aa46e75d4b5c7b64
tree9b7fc72267dce99c537c439ee88b0a7fc0f52774
parentdb1c4942760e926a6c606b924d47ec18d513b674
GVN: Preserve invariant.load metadata

If both instructions to be replaced are marked invariant the resulting
instruction is invariant.

rdar://13358910

Fix by Erik Eckstein!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211801 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/GVN.cpp
test/Transforms/GVN/invariant-load.ll [new file with mode: 0644]