[PATCH] D66882: [DAGCombiner] Match (add X, X) as (shl X, 1) when detecting rotate.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 10:22:32 PDT 2019


lebedev.ri added a comment.

Precommit tests pls.
Please add commutative test - `or` is commutative.



================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:6026
 ///
+///   (or (add v v) (shrl v c)):
+///     expands (add v v) -> (shl v 1)
----------------
I suppose `add v v` implies that `c` can only be `bitwidth-1`


Repository:
  rL LLVM

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

https://reviews.llvm.org/D66882





More information about the llvm-commits mailing list