Attaches a more appropriate debug location to the PHIs used for the
short-circuit evaluations, and makes logical-and and logical-or
handling consistent. Also sets the appropriate debug location for all
scalar conversions, which incidentally does the right thing for
int-to-bool conversions in particular.
While this does tidy up the source locations emitted to IR, it doesn't
appear to make any difference in the final object file for simple
tests. However, it should permit re-applying D91734 and friends to
improve the debug info without exposing the regressions that prompted
the reverts in #615f63e.
I see this is consistent with LAnd handling above, but is there a principled reason for using an empty location here? If I was stopped on this unconditional branch instruction in the debugger, I would expect to see the location of the logical operator.
No need to change behavior in this patch, I'm just wondering if we can remove this as a followup.
I dug into the blame, and the comment about "no need" for a location comes from 2011:
http://github.com/llvm/llvm-project/commit/4d7612744f080d2c0a8639c1f5e41b691e1bba55
The reasoning seems to be that it improves the gdb test suite.