[PATCH] D65930: [IntrinsicEmitter] Support scalable vectors in intrinsics

Cullen Rhodes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 16 03:41:41 PDT 2019


c-rhodes updated this revision to Diff 215550.
c-rhodes edited the summary of this revision.
c-rhodes added a comment.
Herald added a subscriber: javed.absar.

- Moved the intrinsic implementation for abs/neg (without codegen) from D65931 <https://reviews.llvm.org/D65931> so this patch can be tested.
- Added tests for IRBuilder to test scalable vectors work as expected when using intrinsics through the IRBuilder interface. This required implementing an intrinsic that is explicitly defined with scalable vectors, e.g. `LLVMType<nxv4i32>`, an SVE floating-point convert intrinsic was used for this. Also tested the behaviour of the overloaded type `LLVMScalarOrSameVectorWidth` with scalable vectors using the existing masked load intrinsic.
- Replace uses of `getNumElements` with `getElementCount` when handling intrinsic type `LLVMScalarOrSameVectorWidth` so it can correctly support scalable vectors.
- Added an .ll test to test the Verifier catches a bad intrinsic argument when passing a fixed-width predicate (mask) to the abs intrinsic where a scalable is expected.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65930/new/

https://reviews.llvm.org/D65930

Files:
  include/llvm/IR/Intrinsics.h
  include/llvm/IR/IntrinsicsAArch64.td
  include/llvm/Support/ScalableSize.h
  lib/IR/Function.cpp
  test/Verifier/intrinsic-bad-arg-type.ll
  unittests/IR/IRBuilderTest.cpp
  utils/TableGen/IntrinsicEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65930.215550.patch
Type: text/x-patch
Size: 9496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190816/fcd13abf/attachment.bin>


More information about the llvm-commits mailing list