[PATCH] D47681: [DAGCombiner] Bug 31275- Extract a shift from a constant mul or udiv if a rotate can be formed
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 19 02:42:37 PDT 2018
RKSimon added a comment.
I've added your tests to trunk with current codegen so you need to rebase, which will show the effects of your patch.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:5049
+ // op0 must be the same opcode on both sides, have the same LHS argument, and
+ // produce the same value type
+ SDValue OppShiftLHS = OppShift.getOperand(0);
----------------
(style) full stops at the end of comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:5063
+ ConstantSDNode *ExtractFromCst =
+ isConstOrConstSplat(ExtractFrom.getOperand(1));
+ // Check that we have constant values
----------------
It'd be great if this could support non-uniform constant vectors but a TODO comment is fine for now.
https://reviews.llvm.org/D47681
More information about the llvm-commits
mailing list