This is an archive of the discontinued LLVM Phabricator instance.

[SVE][CodeGen] Replace more TypeSize comparison operators with their scalar equivalents
ClosedPublic

Authored by david-arm on Sep 30 2020, 5:31 AM.

Details

Summary

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.

Diff Detail