[PATCH] D69842: [InstCombine] canonicalize shift+logic+shift to reduce dependency chain
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 14:20:05 PST 2019
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp:304-305
+static Instruction *foldShiftOfShiftedLogic(BinaryOperator &I,
+ InstCombiner::BuilderTy &Builder) {
+ auto *LogicInst = dyn_cast<BinaryOperator>(I.getOperand(0));
+ if (!LogicInst || !LogicInst->isBitwiseLogicOp() || !LogicInst->hasOneUse())
----------------
Do you want to assert that `I` (and thus the inner 'shift') is actually a shift?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69842/new/
https://reviews.llvm.org/D69842
More information about the llvm-commits
mailing list