[flang-commits] [flang] [clang] [clang-tools-extra] [mlir] [compiler-rt] [llvm] [mlir][memref] Detect negative `offset` or `size` for `subview` (PR #72059)
    Rik Huijzer via flang-commits 
    flang-commits at lists.llvm.org
       
    Mon Nov 13 03:05:28 PST 2023
    
    
  
================
@@ -2621,6 +2621,15 @@ Type SubViewOp::inferResultType(MemRefType sourceMemRefType,
   dispatchIndexOpFoldResults(offsets, dynamicOffsets, staticOffsets);
   dispatchIndexOpFoldResults(sizes, dynamicSizes, staticSizes);
   dispatchIndexOpFoldResults(strides, dynamicStrides, staticStrides);
+
+  for (int64_t offset : staticOffsets) {
----------------
rikhuijzer wrote:
Because loops are relatively expensive you mean? Is this comment outdated when the logic moves to the interface and is specified as an invariant?
https://github.com/llvm/llvm-project/pull/72059
    
    
More information about the flang-commits
mailing list