[all-commits] [llvm/llvm-project] 0ca46a: [SelectionDAG] Fix the representation of ISD::STEP...

Eli Friedman via All-commits all-commits at lists.llvm.org
Wed Jul 21 10:58:57 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ca46a1757cdb3dd3b38bef077b45171a2dc3592
      https://github.com/llvm/llvm-project/commit/0ca46a1757cdb3dd3b38bef077b45171a2dc3592
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2021-07-21 (Wed, 21 Jul 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/ISDOpcodes.h
    M llvm/include/llvm/CodeGen/SelectionDAG.h
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/lib/Target/AArch64/SVEInstrFormats.td
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/stepvector.ll

  Log Message:
  -----------
  [SelectionDAG] Fix the representation of ISD::STEP_VECTOR.

The existing rule about the operand type is strange.  Instead, just say
the operand is a TargetConstant with the right width.  (Legalization
ignores TargetConstants, so it doesn't matter if that width is legal.)

Highlights:

1. I had to substantially rewrite the AArch64 isel patterns to expect a
TargetConstant.  Nothing too exotic, but maybe a little hairy. Maybe
worth considering a target-specific node with some dagcombines instead
of this complicated nest of isel patterns.
2. Our behavior on RV32 for vectors of i64 has changed slightly. In
particular, we correctly preserve the width of the arithmetic through
legalization.  This changes the DAG a bit. Maybe room for
improvement here.
3. I explicitly defined the behavior around overflow. This is necessary
to make the DAGCombine transforms legal, and I don't think it causes any
practical issues.

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




More information about the All-commits mailing list