[PATCH] D109294: [Inline] Remove dead users before checking if function has one use (PR51667)

Erik Desjardins via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 5 13:12:51 PDT 2021


erikdesjardins added inline comments.


================
Comment at: llvm/test/Transforms/Inline/last-callsite.ll:263
   ; constant expressions to reference a particular function with them.
-  %sink = alloca i1
-  store volatile i1 icmp ne (i64 ptrtoint (void (i1)* @test4_g to i64), i64 ptrtoint(void (i1)* @test4_g to i64)), i1* %sink
+  store void (i1)* @test4_g, void (i1)** %sink
   call void @test4_g(i1 true)
----------------
nikic wrote:
> This doesn't preserve the spirit of the test. You should replace the constant expression with something that doesn't fold, e.g. use `mul` instead of `icmp ne`.
Ah sorry, I meant to leave a comment about this. Fixed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109294



More information about the llvm-commits mailing list