In the attached C test case, when joining variable locations from two parent blocks, the "baz" variable in one parent is located in a register with an empty DIExpression, in the other block it's located in the same register but with a complex expression. LiveDebugValues wrongly decides that this is the same location, and propagates one of the locations for "baz" to the exit block. The correct behaviour would be to propagate no location: the value of "baz" depends on the path taken through the program, and isn't stored in a register or stack slot.
Happily this is a simple as adding a DIExpression field to the "VarLoc" class (which identifies a machine location), and having VarLocs compare unequal if their DIExpressions are different. This relies on the DIExpressions being uniq'd, which I believe metadata guarantees.
On a clang-3.4 build this results in no variable losing all their locations, and a fall in 0.6% scope-bytes-covered. Which is great, because those are probably invalid locations.