[PATCH] D144927: [GVNHoist] don't hoist callbr users into the callbr's block

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 13:47:10 PST 2023


nickdesaulniers added inline comments.


================
Comment at: llvm/test/Transforms/GVNHoist/hoist-call.ll:139
+entry:
+  callbr void asm "", "=*m,!i"(ptr elementtype(i32) @x)
+  to label %a [label %b]
----------------
efriedma wrote:
> I just verified that if you mark this callbr "readnone", hoisting happens.  Please adjust the testcase to demonstrate that hoisting.
I can do that...but...

If you add `readnone` to the above test case `@foo3` (not `@foo4` which you were referring to), we also hoist, which looks wrong to me...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144927/new/

https://reviews.llvm.org/D144927



More information about the llvm-commits mailing list