[llvm] InstSimplify: lookthru casts, binops in folding shuffles (PR #92668)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 06:38:14 PDT 2024
arsenm wrote:
> > You cannot RAUW inside InstSimplify. InstSimplify is an analysis, it cannot change IR in any way.
>
> Oh no. Looks like I have to clone the entire chain of instructions, make the replacement in the new head instruction, and return the new tail? Is InstSimplify poorly-suited for this kind of change, and should I just leave it up to VectorCombine?
You shouldn't be creating new instructions in instsimplify. It's for returning operands or existing instructions
https://github.com/llvm/llvm-project/pull/92668
More information about the llvm-commits
mailing list