[llvm] [LV] Vectorization of compress idiom (PR #83467)

Kolya Panchenko via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 29 12:25:01 PST 2024


================
@@ -4102,6 +4112,12 @@ bool LoopVectorizationCostModel::memoryInstructionCanBeWidened(
   return true;
 }
 
+bool LoopVectorizationCostModel::memoryInstructionUsesMonotonic(
+    Instruction *I, ElementCount VF) {
+  assert((isa<LoadInst, StoreInst>(I)) && "Invalid memory instruction");
----------------
nikolaypanchenko wrote:

looks like I cannot:
```
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4117:24: error: too many arguments provided to function-like macro invocation
  assert(isa<LoadInst, StoreInst>(I) && "Invalid memory instruction");
                       ^
/usr/include/assert.h:89:11: note: macro 'assert' defined here
#  define assert(expr)                                          
```

https://github.com/llvm/llvm-project/pull/83467


More information about the llvm-commits mailing list