[PATCH] D74933: [Hexagon] Introduce noop intrinsic to cast between vector predicate types

Krzysztof Parzyszek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 14:58:03 PST 2020


kparzysz created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

The (overloaded) intrinsic is `llvm.hexagon.V6.pred.typecast[.128B]`. The types of the operand and the return value are HVX boolean vector types. For each cast, there need to be the corresponding intrinsic declared, with different suffixes appended to the name, e.g.

  ; cast <128 x i1> to <32 x i1>
  declare <32 x i1> @llvm.hexagon.V6.pred.typecast.128B.s1(<128 x i1>)
  ; cast <32 x i1> to <64 x i1>
  declare <64 x i1> @llvm.hexagon.V6.pred.typecast.128B.s2(<32 x i1>)

etc.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74933

Files:
  llvm/include/llvm/IR/IntrinsicsHexagon.td
  llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
  llvm/lib/Target/Hexagon/HexagonISelLowering.h
  llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
  llvm/test/CodeGen/Hexagon/autohvx/vector-predicate-typecast.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74933.245752.patch
Type: text/x-patch
Size: 6994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200220/0fc66d25/attachment.bin>


More information about the llvm-commits mailing list