[PATCH] D106189: [InstSimplify] Expose generic interface for replaced operand simplification
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 16 14:28:49 PDT 2021
nikic added a comment.
I don't think `simplifyWithOpReplaced()` is the right starting point for this. This function has a specific purpose and it has complex and dangerous semantics.
I think what you really want is something along the lines of ConstantFoldInstruction vs ConstantFoldInstOperands. That is, you should take SimplifyInstruction and rewrite it into a SimplifyInstOperands function that takes the operands as an explicit ArrayRef, and then call that from SimplifyInstruction. That will ensure that you can actually simplify all instructions that InstSimplify supports, rather than just the peculiar subset that simplifyWithOpReplaced deals with.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106189/new/
https://reviews.llvm.org/D106189
More information about the llvm-commits
mailing list