[PATCH] D81166: [Matrix] Add matrix_nuw/matrix_nsw operand bundles for matrix.multiply.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 08:12:10 PDT 2020


fhahn created this revision.
fhahn added reviewers: anemet, Gerolf, hfinkel, andrew.w.kaylor, LuoYuanke, nicolasvasilache.
Herald added subscribers: tschuett, hiraditya.
Herald added a project: LLVM.
fhahn added a subscriber: reames.
fhahn added a comment.

cc @reames as he recently worked on making use of operand bundles for the state point intrinsics and may have some suggestions on the use of bundles.


This patch adds new matrix_nuw/matrix_nsw operand bundles for
matrix.multiply, to indicate whether NUW/NSW flags should be added when
lowering a integer multiplication.

Using operand bundles for those optional arguments seems a bit more
elegant and lightweight than making matrix.multiply variadic (as
proposed in D80124 <https://reviews.llvm.org/D80124>). It should also be easier to add additional
arguments, like the layout of the operands, in the future.

There seems to be some precedence of using operand bundles in that way.
For example, recently the statepoint intrinsics are transitioning to use
operand bundles. See D80598 <https://reviews.llvm.org/D80598> and  27304b1737a3 <https://reviews.llvm.org/rG27304b1737a3ff0bca39ddd3ed11b96a624a1d6d> for examples.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81166

Files:
  llvm/docs/LangRef.rst
  llvm/include/llvm/IR/LLVMContext.h
  llvm/lib/IR/LLVMContext.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-i32-nuw-nsw.ll
  llvm/test/Verifier/matrix-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81166.268474.patch
Type: text/x-patch
Size: 32361 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200604/4ba6d8e9/attachment.bin>


More information about the llvm-commits mailing list