[PATCH] D108837: [SimplifyCFG] Ignore free instructions when computing cost for folding branch to common dest
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 30 12:20:52 PDT 2021
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:3140
+static bool isVectorOp(Instruction &I) {
+ return I.getType()->isVectorTy() || any_of(I.operands(), [](Use &U) {
----------------
aeubanks wrote:
> lebedev.ri wrote:
> > I think this should be in `Instruction`.
> > Is there any instruction that takes scalars only but produces vector?
> `Instruction` doesn't have methods that inspect the operands (except some equality methods). Currently this is specific to SimplifyCFG so I think at least for now it should be here.
>
> Not sure if any instruction takes scalars and produces vectors, but those should count?
Err, right, they are, missed the `I.getType()->isVectorTy() || `, sorry.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108837/new/
https://reviews.llvm.org/D108837
More information about the llvm-commits
mailing list