[llvm] [Inline][Cloning] Drop incompatible attributes from `NewFunc` before `instSimplify` (PR #90489)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 18:16:11 PDT 2024


nikic wrote:

> If it's not feasible to fix this by rewriting the returns before we perform the simplification, then I'd prefer to go with the fix from #87482 instead (with some comments to explain why we're doing this).

Thinking about this some more, I don't think that fix works -- while it might avoid the assertion failure, I'm pretty sure that there is an inverse case where we perform incorrect optimizations using noundef from the parent function instead.

I've been looking at the inlining code and it seems like the rewrite of returns happens annoyingly late, so maybe this PR is an acceptable way to work around the issue in the meantime...



https://github.com/llvm/llvm-project/pull/90489


More information about the llvm-commits mailing list