[PATCH] D88482: [SVE][CodeGen] Replace TypeSize comparison operators with their scalar equivalents

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 06:05:28 PDT 2020


david-arm created this revision.
david-arm added reviewers: sdesmalen, efriedma, ctetreau, kmclaughlin.
Herald added subscribers: llvm-commits, ecnelises, steven.zhang, psnobl, hiraditya, tschuett.
Herald added a project: LLVM.
david-arm requested review of this revision.

In certain places in llvm/lib/CodeGen we were relying upon the TypeSize
comparison operators when in fact the code was only ever expecting
either scalar values or fixed width vectors. I've changed all such
places to use the equivalent scalar operator. Whilst doing this I
also realised there were a few functions that were always expecting
to work on scalar or fixed width types:

1. DAGCombiner::mergeTruncStores - deals with scalar integers only.
2. DAGCombiner::ReduceLoadWidth - not valid for vectors.
3. DAGCombiner::createBuildVecShuffle - should only be used for fixed width vectors.
4. SelectionDAGLegalize::ExpandFCOPYSIGN and SelectionDAGLegalize::getSignAsIntValue - only work on scalars.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88482

Files:
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/lib/CodeGen/TargetLoweringBase.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88482.294950.patch
Type: text/x-patch
Size: 14457 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200929/78b9bd67/attachment.bin>


More information about the llvm-commits mailing list