[PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables

Vitaly Buka via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 21 17:11:52 PDT 2016


vitalybuka added a comment.

Miscompile.
Here assert fails without the patch.

int* p1;
int* p2;

int use2() {

  assert(p1 != p2 || !"reuse");
  return p1 == p2;

}

void f3(int cond) {

  {
    int tmp[1024];
    p1 = tmp;
    goto l2;
  l1:
    int tmp2[1024];
    p2 = tmp2;
    exit(use2());
  }

l2:

  goto l1;

}


https://reviews.llvm.org/D24693





More information about the cfe-commits mailing list