[all-commits] [llvm/llvm-project] 629965: [DAGCombiner] Fold trunc(undef) -> undef.

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Aug 14 13:02:44 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6299650f9788c8b6cc784dbf8fe4086b552be2f1
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-08-14 (Mon, 14 Aug 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/RISCV/pr64503.ll

  Log Message:
  [DAGCombiner] Fold trunc(undef) -> undef.

We already do this in getNode, but the undef might appear during
another DAGCombine.

While here remove code for handling noop truncates. getNode checks
the types and won't a noop truncate.

Reviewed By: arsenm

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

More information about the All-commits mailing list