[all-commits] [llvm/llvm-project] 3c8bf2: [DAG] Move "xor (X logical_shift ShiftC), XorC -->...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Jul 15 05:11:26 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3c8bf29696c3439a6279807dc56c4afcc21b8112
      https://github.com/llvm/llvm-project/commit/3c8bf29696c3439a6279807dc56c4afcc21b8112
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-07-15 (Fri, 15 Jul 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    M llvm/test/CodeGen/X86/xor.ll

  Log Message:
  -----------
  [DAG] Move "xor (X logical_shift ShiftC), XorC --> (not X) logical_shift ShiftC" fold into SimplifyDemandedBits

SimplifyDemandedBits is called slightly later which allows the not(sext(x)) -> sext(not(x)) fold to occur via foldLogicOfShifts

As mentioned on D127115, we should be able to further generalise this based off the demanded bits.




More information about the All-commits mailing list