[PATCH] D32006: Mark invariant.group.barrier as inaccessiblememonly

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 00:57:42 PDT 2017


sanjoy requested changes to this revision.
sanjoy added a comment.
This revision now requires changes to proceed.

Doesn't this conflict with the test case you had for https://reviews.llvm.org/D31531:

  void foo() {
      Base *x = new Base{};
      new (x) Derived1{};
      int a = std::launder(x)->foo();
      new (x) Derived2{};
      int b = std::launder(x)->foo();
  }

Won't it now be OK to CSE the two `launders` since the only memory changed between the two is visible to the module (and thus not read by an `inaccessiblememonly readonly` function)?


Repository:
  rL LLVM

https://reviews.llvm.org/D32006





More information about the llvm-commits mailing list