mrkajetanp wrote: For more details on the above, the problem happens once the loop vectorizer transforms a loop with this metadata that's inside an openmp block. The dbg metadata becomes incorrectly attached and as a result verifyFunction returns a failure. ``` !dbg attachment points at wrong subprogram for function !2094 = distinct !DISubprogram(name: "main.omp_outlined", scope: !2, file: !2, line: 207, type: !2095, scopeLine: 207, flags: DIFlagArtificial | DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !25, retainedNodes: !2102) ptr @main.omp_outlined br i1 %53, label %middle.block, label %vector.body, !dbg !2327, !llvm.loop !2338 !2339 = !DILocation(line: 258, column: 5, scope: !2162) !2162 = distinct !DILexicalBlock(scope: !2163, file: !2, line: 258, column: 5) !2118 = distinct !DISubprogram(name: "main.omp_outlined_debug__", scope: !2, file: !2, line: 208, type: !2095, scopeLine: 208, flags: DIFlagArtificial | DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !25, retainedNodes: !2119) clang-21: ~/llvm/llvm-project-release/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:11013: bool llvm::LoopVectorizePass::processLoop(Loop *): Assertion `!verifyFunction(*L->getHeader()->getParent(), &dbgs())' failed. ```
https://github.com/llvm/llvm-project/pull/131985 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits