[PATCH] D31539: Hoisting invariant.group in LICM

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 2 13:38:37 PDT 2017


sanjoy added a comment.

Hi Piotr,

Won't this patch allow a situation like this:

  for (;;) {
    vtable = load ptr0, !invariant.group
    use(vtable)
    store new vtable to ptr0
    ptr1 = barrier(ptr0)
    // ptr1 is not used, say
  }

to

  for (;;) {
    store new vtable to ptr0
    ptr1 = barrier(ptr0)
    // ptr1 is not used, say
  }
  vtable = load ptr0, !invariant.group
  use(vtable)

?

After this, the load of `vtable` will return the newer vtable, which seems problematic.


https://reviews.llvm.org/D31539





More information about the llvm-commits mailing list