[PATCH] D147025: [InstCombine] Teach alloca replacement to handle `addrspacecast`
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 30 08:18:25 PDT 2023
nikic requested changes to this revision.
nikic added a comment.
This revision now requires changes to proceed.
Herald added a subscriber: StephenFan.
As far as I can tell, your motivating test cases do not require the TTI hook. They only need trivial address space casts (to the same address space).
Using TTI inside InstCombine is forbidden as a matter of policy. You would need to make an argument for why this exception should be allowed (it would probably go along the lines of "this should really be part of data layout"), so I would recommend to only handle this trivial case first and bypass the TTI issue.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147025/new/
https://reviews.llvm.org/D147025
More information about the llvm-commits
mailing list