[all-commits] [llvm/llvm-project] 84547e: [X86] and-shift.ll - add gnux32 test coverage to e...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Mar 12 06:25:51 PDT 2023


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

  Changed paths:
    M llvm/test/CodeGen/X86/and-shift.ll

  Log Message:
  -----------
  [X86] and-shift.ll - add gnux32 test coverage to ensure the X32 ABI correctly narrows the i64 shifts


  Commit: b53ea2b9c5ac252fa417f5fe76ce805bb09ed1ab
      https://github.com/llvm/llvm-project/commit/b53ea2b9c5ac252fa417f5fe76ce805bb09ed1ab
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2023-03-12 (Sun, 12 Mar 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
    M llvm/test/CodeGen/AMDGPU/load-constant-i16.ll
    M llvm/test/CodeGen/AMDGPU/load-global-i16.ll
    M llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll
    M llvm/test/CodeGen/X86/3addr-or.ll
    M llvm/test/CodeGen/X86/abdu.ll
    M llvm/test/CodeGen/X86/addcarry.ll
    M llvm/test/CodeGen/X86/avx512cd-intrinsics-upgrade.ll
    M llvm/test/CodeGen/X86/avx512cdvl-intrinsics-upgrade.ll
    M llvm/test/CodeGen/X86/avx512fp16-mov.ll
    M llvm/test/CodeGen/X86/cmp-concat.ll
    M llvm/test/CodeGen/X86/dag-update-nodetomatch.ll
    M llvm/test/CodeGen/X86/is_fpclass-fp80.ll
    M llvm/test/CodeGen/X86/memset-inline.ll
    M llvm/test/CodeGen/X86/memset-nonzero.ll
    M llvm/test/CodeGen/X86/memset-vs-memset-inline.ll
    M llvm/test/CodeGen/X86/narrow-shl-cst.ll
    M llvm/test/CodeGen/X86/pr30562.ll
    M llvm/test/CodeGen/X86/pr35763.ll
    M llvm/test/CodeGen/X86/subcarry.ll
    M llvm/test/CodeGen/X86/switch-phi-const.ll
    M llvm/test/CodeGen/X86/switch.ll

  Log Message:
  -----------
  [DAG] visitAND - fold (and (any_ext V), c) -> (zero_ext (and (trunc V), c)) if profitable.

Try to more aggressively narrow masks of extended values.

This is mainly for cases where the mask is trying to zero out any_extended upper bits, assuming we can zext/trunc the values for free.

This catches a few actual missed folds, as well as helps canonicalize a number of other cases which were being caught in isel etc.

Differential Revision: https://reviews.llvm.org/D145866


Compare: https://github.com/llvm/llvm-project/compare/1597e5e6932b...b53ea2b9c5ac


More information about the All-commits mailing list