[all-commits] [llvm/llvm-project] faa35f: [DAG] Fix issue with rot(rot(x, c1), c2) -> rot(x, c1...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue May 3 09:16:42 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: faa35fc873700b6d3e61e652c887b82d1cea7c0c
      https://github.com/llvm/llvm-project/commit/faa35fc873700b6d3e61e652c887b82d1cea7c0c
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-05-03 (Tue, 03 May 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/X86/combine-rotates.ll

  Log Message:
  -----------
  [DAG] Fix issue with rot(rot(x,c1),c2) -> rot(x,c1+c2) fold with unnormalized rotation amounts

Don't assume the rotation amounts have been correctly normalized - do it as part of the constant folding.

Also, the normalization should be performed with UREM not SREM.




More information about the All-commits mailing list