[PATCH] D101262: [SelectionDAG] Use a VTSDNode to store the saturation width for FP_TO_SINT_SAT/FP_TO_UINT_SAT

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 25 11:27:50 PDT 2021


craig.topper created this revision.
craig.topper added reviewers: spatel, RKSimon, bjope, nikic.
Herald added subscribers: ecnelises, luismarques, pengfei, s.egerton, PkmX, simoncook, hiraditya, jgravelle-google, sbc100, dschuff.
craig.topper requested review of this revision.
Herald added a subscriber: aheejin.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101262

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101262.340374.patch
Type: text/x-patch
Size: 9729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210425/ab9a3df9/attachment.bin>


More information about the llvm-commits mailing list