[PATCH] D152358: [CGP] Remove operand of llvm.assume more aggressively.

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 03:59:00 PDT 2023


skatkov created this revision.
skatkov added reviewers: arsenm, xbolva00, bkramer, Carrot, craig.topper, efriedma.
Herald added a subscriber: hiraditya.
Herald added a project: All.
skatkov requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

At the moment CGP recursively removes operand of llvm.assume but
it does it only for instructions has no more than one use.

This is not enough for some induction variable which is used only
in llvm.assume.

As soon as there is no any dead code elimination passes between
CGP and instruction selector it makes sense to apply more efforts
at CGP to remove dead code.


https://reviews.llvm.org/D152358

Files:
  llvm/lib/CodeGen/CodeGenPrepare.cpp
  llvm/test/Transforms/CodeGenPrepare/X86/delete-assume-dead-code.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152358.529237.patch
Type: text/x-patch
Size: 4962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230607/887135b8/attachment.bin>


More information about the llvm-commits mailing list