Commit 99224f9e authored by Tom Stellard's avatar Tom Stellard
Browse files

Merging r245588:

------------------------------------------------------------------------
r245588 | aprantl | 2015-08-20 14:23:56 -0400 (Thu, 20 Aug 2015) | 11 lines

Fix a debug location handling bug in GVN.
Caught by the famous "DebugLoc describes the currect SubProgram" assertion.

When GVN is removing a nonlocal load it updates the debug location of the
SSA value it replaced the load with with the one of the load. In the
testcase this actually overwrites a valid debug location with an empty one.

In reality GVN has to make an arbitrary choice between two equally valid
debug locations. This patch changes to behavior to only update the
location if the value doesn't already have a debug location.

------------------------------------------------------------------------

llvm-svn: 253571
parent 3dee2105
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment