[PATCH] D75114: [DAG] MatchRotate - Add funnel shift by immediate support

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 11 06:18:07 PDT 2020


lebedev.ri added reviewers: sameconrad, hans.
lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.

Looks good to me.
Anyone else?



================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:6410-6411
+  // fold (or (shl x, C1), (srl y, C2)) -> (fshl x, y, C1)
+  // fold (or (shl x, C1), (srl y, C2)) -> (fshr x, y, C2)
   auto MatchRotateSum = [EltSizeInBits](ConstantSDNode *LHS,
                                         ConstantSDNode *RHS) {
----------------
/// ... where C1+C2 == bitwidth(x)


================
Comment at: llvm/test/CodeGen/X86/known-bits.ll:123
 ; X64-NEXT:    addq %rdi, %rsi
-; X64-NEXT:    adcl $0, %edx
+; X64-NEXT:    adcq $0, %rdx
 ; X64-NEXT:    shldq $54, %rsi, %rdx
----------------
lebedev.ri wrote:
> Demandedbits failure? (no longer narrowed into 32-bit)
Still applicable


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75114/new/

https://reviews.llvm.org/D75114





More information about the llvm-commits mailing list