[PATCH] D151943: [InstCombine] Propagate some func/arg/ret attributes from caller to callsite

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 14:59:12 PDT 2023


nikic requested changes to this revision.
nikic added a comment.
This revision now requires changes to proceed.

> This patch only implements the attributes can can be blindly propagated.

At least the function-level nofree and memory attributes cannot be propagated. E.g. a function that allocates and frees internally is nofree. Writes and reads to allocas are `memory(none)` from a function perspective, etc. You can see multiple miscompiles due to this in the test diffs.

More generally, I'm not sure this code belongs in InstCombine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151943



More information about the llvm-commits mailing list