[SVE][CodeGen] Replace more TypeSize comparison operators with their scalar equivalents
authorDavid Sherwood <david.sherwood@arm.com>
Tue, 29 Sep 2020 11:08:40 +0000 (12:08 +0100)
committerDavid Sherwood <david.sherwood@arm.com>
Mon, 19 Oct 2020 07:38:50 +0000 (08:38 +0100)
commit3945b69e815b3312125a0461b8b6ba53349ab3ed
treee3325a476b557a64bb08a6e197db5861ab644446
parent039f3d01cbff8e162b38671f2e8ff802b74298c8
[SVE][CodeGen] Replace more TypeSize comparison operators with their scalar equivalents

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. This patch changes 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.

Differential Revision: https://reviews.llvm.org/D88562
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp