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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 5 11:59:58 PDT 2021


nikic added reviewers: mtrofin, aeubanks, kazu.
nikic added a comment.

Looks reasonable to me.



================
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)
----------------
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`.


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