[PATCH] D80394: Add `shape.get_extent`.

Jacques Pienaar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 06:27:35 PDT 2020


jpienaar added inline comments.


================
Comment at: mlir/lib/Dialect/Shape/IR/Shape.cpp:290
+  uint64_t dimToGet = dim().getLimitedValue();
+  // TODO: Constant fold this to some kind of undefined behavior if we
+  // index out of range.
----------------
jpienaar wrote:
> I'm not convinced of this unless we add this check to this op's verify method.
And this is not UB: this is an error.  It can be folded to constant size error.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80394





More information about the llvm-commits mailing list