Skip to content
Commit 84a71d52 authored by OCHyams's avatar OCHyams
Browse files

[DebugInfo] Fix line number attribution in mldst-motion

Taking the example from the test included in this patch:

$ cat test.cpp -n
     1	void fun(int *a, int cond) {
     2	  if (cond)
     3	    a[1] = 1;
     4	  else
     5	    a[1] = 2;
     6	}

mldst-motion will merge and sink the stores in if.then and if.else into
if.end. The resultant PHI, gep and store should be attributed line zero
with the innermost common scope rather than picking a debug location from
one of the original stores.

Reviewed By: djtodoro

Differential Revision: https://reviews.llvm.org/D132741
parent bb3d14ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment