[PATCH] D57090: [IR] Match intrinsic paramater by scalar/vectorwidth

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 23 03:25:54 PST 2019


RKSimon created this revision.
RKSimon added reviewers: spatel, andreadb, craig.topper, delena, leonardchan, majnemer.

This patch replaces the existing LLVMVectorSameWidth matcher with LLVMScalarOrSameVectorWidth.

The matching args must be either scalars or vectors with the same number of elements, but in either case the scalar/element type can differ, specified by LLVMScalarOrSameVectorWidth.

I've updated the _overflow intrinsics to demonstrate this - allowing it to return a i1 or <N x i1> overflow result, matching the scalar/vectorwidth of the other (add/sub/mul) result type.

The masked load/store/gather/scatter intrinsics have also been updated to use this, although as we specify the reference type to be llvm_anyvector_ty we guarantee the mask will be <N x i1> so no change in behaviour


Repository:
  rL LLVM

https://reviews.llvm.org/D57090

Files:
  include/llvm/IR/Intrinsics.td
  lib/IR/Function.cpp
  test/Analysis/CostModel/X86/arith-overflow.ll
  utils/TableGen/CodeGenTarget.cpp
  utils/TableGen/IntrinsicEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57090.183073.patch
Type: text/x-patch
Size: 46149 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190123/791f2c85/attachment.bin>


More information about the llvm-commits mailing list