[llvm] [VectorCombine] Enable transform 'scalarizeLoadExtract' for non constant indexes (PR #65445)

Ben Shi via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 21:43:24 PDT 2023


================
@@ -969,7 +970,11 @@ class ScalarizationResult {
 public:
   ScalarizationResult(const ScalarizationResult &Other) = default;
   ~ScalarizationResult() {
-    assert(!ToFreeze && "freeze() not called with ToFreeze being set");
+    // The object may be copied to another scope if it is in state
+    // StatusTy::SafeWithFreeze.
+    if (Status != StatusTy::SafeWithFreeze)
----------------
benshi001 wrote:

When this class object is used in `std::make_pair` at line 1182, `std::make_pair` will create a temp local object in its stackframe, then the assert will be triggered. So I have to avoid this via adding a check before the assert.
To a

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


More information about the llvm-commits mailing list