[all-commits] [llvm/llvm-project] 7b1e42: [DAG] Fold (vt trunc (extload (vt x))) -> (vt load...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Dec 18 08:21:24 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7b1e4239b396e57919a56a965282c30711b6b4e8
      https://github.com/llvm/llvm-project/commit/7b1e4239b396e57919a56a965282c30711b6b4e8
  Author: Simon Pilgrim <RKSimon at users.noreply.github.com>
  Date:   2023-12-18 (Mon, 18 Dec 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/AMDGPU/ctpop16.ll
    M llvm/test/CodeGen/AMDGPU/cttz_zero_undef.ll
    M llvm/test/CodeGen/AMDGPU/kernel-args.ll

  Log Message:
  -----------
  [DAG] Fold (vt trunc (extload (vt x))) -> (vt load x) (#75229)

We were only folding cases which remained extloads, but DAG.getExtLoad can also handle the cases which don't need to extend at all (we just can't do truncloads).

reduceLoadWidth can handle this for scalar loads, but not for vectors.

Noticed while triaging D152928




More information about the All-commits mailing list