llvm-project/llvm/test/Transforms/SROA
Reid Kleckner 0fe506bc5e Re-land r313825: "[IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare"
The fix is to avoid invalidating our insertion point in
replaceDbgDeclare:
     Builder.insertDeclare(NewAddress, DIVar, DIExpr, Loc, InsertBefore);
+    if (DII == InsertBefore)
+      InsertBefore = &*std::next(InsertBefore->getIterator());
     DII->eraseFromParent();

I had to write a unit tests for this instead of a lit test because the
use list order matters in order to trigger the bug.

The reduced C test case for this was:
  void useit(int*);
  static inline void inlineme() {
    int x[2];
    useit(x);
  }
  void f() {
    inlineme();
    inlineme();
  }

llvm-svn: 313905
2017-09-21 19:52:03 +00:00
..
address-spaces.ll [SROA] Fix APInt size when load/store have different address space 2017-06-09 20:46:29 +00:00
alignment.ll
alloca-address-space.ll [SROA] Fix APInt size when alloca address space is not 0 2017-06-27 18:26:06 +00:00
basictest.ll Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
big-endian.ll
dbg-addr-diamond.ll Re-land r313825: "[IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare" 2017-09-21 19:52:03 +00:00
dbg-single-piece.ll Parse and print DIExpressions inline to ease IR and MIR testing 2017-08-23 20:31:27 +00:00
fca.ll
mem-par-metadata-sroa.ll
non-integral-pointers.ll [SROA] Add support for non-integral pointers 2017-06-17 20:28:13 +00:00
phi-and-select.ll
ppcf128-no-fold.ll
pr26972.ll Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
preserve-nonnull.ll [SROA] Fix PR32902 by more carefully propagating !nonnull metadata. 2017-06-27 08:32:03 +00:00
slice-order-independence.ll
slice-width.ll
vector-conversion.ll
vector-lifetime-intrinsic.ll Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
vector-promotion.ll
vectors-of-pointers.ll