[all-commits] [llvm/llvm-project] 28a0d0: [DAG] Don't fold zext(logicalshift(zext(x), c)) -> ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Mar 15 10:45:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 28a0d0e85ab5fe9ccc5cd684bd28bfb15f661f45
      https://github.com/llvm/llvm-project/commit/28a0d0e85ab5fe9ccc5cd684bd28bfb15f661f45
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2023-03-15 (Wed, 15 Mar 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/X86/zext-lshr.ll
    M llvm/test/CodeGen/X86/zext-shl.ll

  Log Message:
  -----------
  [DAG] Don't fold zext(logicalshift(zext(x),c)) -> logicalshift(zext(x),c) if the outer zext is free

Avoid widening the shift to a bigger type if the zext would be free anyway

Pulled out of D146121




More information about the All-commits mailing list