[all-commits] [llvm/llvm-project] 306752: [SelectionDAG] Use a VTSDNode to store the saturat...

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Apr 27 14:53:53 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3067520bf463d93b17c4a92508e28df6b9bb90a9
      https://github.com/llvm/llvm-project/commit/3067520bf463d93b17c4a92508e28df6b9bb90a9
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-04-27 (Tue, 27 Apr 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/ISDOpcodes.h
    M llvm/include/llvm/Target/TargetSelectionDAG.td
    M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
    M llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyInstrConv.td
    M llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
    M llvm/lib/Target/X86/X86ISelLowering.cpp

  Log Message:
  -----------
  [SelectionDAG] Use a VTSDNode to store the saturation width for FP_TO_SINT_SAT/FP_TO_UINT_SAT

Previously we used an i32 constant to store the saturation width, but i32 isn't
legal on RISCV64. This wasn't a big deal to fix, but it is extra work for the
type legalizer.

This patch uses a VTSDNode to store the type similar to SEXT_INREG. This makes
it opaque to the type legalizer.

Reviewed By: nikic

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




More information about the All-commits mailing list