[llvm] [llvm] Remove incorrect IRMover assert (PR #221758)
Henry Jiang via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 18:08:39 PDT 2026
mustartt wrote:
Reduced reproducer.
```llvm
hjiang at mbp reproducer % cat check.sh
#!/bin/zsh
set -u
mkdir -p tmp
opt -module-summary -o tmp/dst.bc dst.ll
opt -module-summary -o tmp/src.bc src.ll
llvm-lto2 run -o tmp/out tmp/dst.bc tmp/src.bc \
-r tmp/dst.bc,dst_f,px -r tmp/dst.bc,src_f, -r tmp/src.bc,src_f,px
echo "llvm-lto2 exit: $?"
hjiang at mbp reproducer % cat src.ll
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%T2 = type { double, double, i32, i32 }
define void @src_f(ptr byval(%T2) %p) {
ret void, !dbg !3
}
!llvm.module.flags = !{!0}
!llvm.dbg.cu = !{!1}
!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, emissionKind: FullDebug)
!2 = !DIFile(filename: "src.cpp", directory: "")
!3 = !DILocation(line: 1, scope: !4)
!4 = distinct !DISubprogram(name: "g", scope: !2, file: !2, type: !5, spFlags: DISPFlagDefinition, unit: !1)
!5 = !DISubroutineType(types: !6)
!6 = !{!7}
!7 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "Shared", identifier: "_ZTS6Shared")
hjiang at mbp reproducer % cat dst.ll
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%T1 = type { double, double, i32, i32 }
define void @dst_f() {
call void @src_f(ptr byval(%T1) null), !dbg !3
ret void
}
declare void @src_f(ptr)
!llvm.module.flags = !{!0}
!llvm.dbg.cu = !{!1}
!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, emissionKind: FullDebug)
!2 = !DIFile(filename: "dst.cpp", directory: "")
!3 = !DILocation(line: 1, scope: !4)
!4 = distinct !DISubprogram(name: "f", scope: !2, file: !2, type: !5, spFlags: DISPFlagDefinition, unit: !1)
!5 = !DISubroutineType(types: !6)
!6 = !{!7}
!7 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "Shared", templateParams: !8, identifier: "_ZTS6Shared")
!8 = !{!9}
!9 = !DITemplateValueParameter(value: %T1 zeroinitializer)
```
https://github.com/llvm/llvm-project/pull/221758
More information about the llvm-commits
mailing list