[PATCH] D88654: [SVE][CodeGen] Replace uses of TypeSize comparison operators with calls to isKnownXY

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 06:58:44 PDT 2020


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

In certain places in the code we can never end up in a situation where
we're mixing fixed width and scalable vector types. For example,
we can't have truncations and extends that change the lane count. In
such cases it's perfectly fine to replace the comparison operators
with calls to the equivalent TypeSize::isKnownXY functions. The answer
should always be known at compile time. Also, in other places such as
GenWidenVectorStores and GenWidenVectorLoads we know from the behaviour
of FindMemType that we can never choose a vector type with a different
scalable property.

In a couple of places I have used the EVT::bitsLT function instead, where it
probably makes sense to keep an assert that scalable properties match.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88654

Files:
  llvm/include/llvm/CodeGen/BasicTTIImpl.h
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88654.295560.patch
Type: text/x-patch
Size: 7031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201001/72d0dd97/attachment.bin>


More information about the llvm-commits mailing list