[PATCH] D58009: [DAGCombine] Simplify funnel shifts with undef/zero args to bitshifts
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 10 08:19:52 PST 2019
lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.
Looks ok to me.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:7169
+ // iff We know the shift amount is in range.
+ // TODO: when is it worth doing SUB(BW, N2) as well?
+ if (isPowerOf2_32(BitWidth)) {
----------------
Hmm, if `FeatureSlowSHLD` is set, or we have BMI2 (and thus sh[lr]x, not depending on `%cl` reg)?
Also, to be noted `sub 32, n` should get folded to `neg n`, IIRC.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58009/new/
https://reviews.llvm.org/D58009
More information about the llvm-commits
mailing list