[all-commits] [llvm/llvm-project] 84a71d: [DebugInfo] Fix line number attribution in mldst-m...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Tue Aug 30 02:08:57 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 84a71d5259c2682403cdbd8710592410a2f128ab
      https://github.com/llvm/llvm-project/commit/84a71d5259c2682403cdbd8710592410a2f128ab
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2022-08-30 (Tue, 30 Aug 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
    A llvm/test/DebugInfo/Generic/mldst-motion-dbg.ll

  Log Message:
  -----------
  [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




More information about the All-commits mailing list