[Pipelines] Add a test how DCE works after ArgumentPromotion
authorPavel Samolysov <samolisov@gmail.com>
Thu, 30 Jun 2022 09:54:02 +0000 (12:54 +0300)
committerPavel Samolysov <samolisov@gmail.com>
Thu, 30 Jun 2022 09:56:08 +0000 (12:56 +0300)
commit3b7650da725c03b0cd1c3a9bc19d081da3bb042f
treef55cbaa3b39ee0ebfad074c17bd95b779497f5a3
parent1579fc62fe4ebf6bf0be8b405d3f711a1537ebf9
[Pipelines] Add a test how DCE works after ArgumentPromotion

The ArgumentPromotion pass uses Mem2Reg promotion at the end to cutting
down generated alloca instructions as well as meaningless stores and
this behavior can leave unused (dead) arguments.

The test shows that the arguments are not removed in the current
optimization pipeline.
llvm/test/Transforms/PhaseOrdering/dce-after-argument-promotion.ll [new file with mode: 0644]