[PATCH] D92842: [RFC][SelectionDAG] Add Target-Independent Compiler Barrier
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 17 18:18:30 PST 2021
skan added a comment.
In D92842#2561721 <https://reviews.llvm.org/D92842#2561721>, @lenary wrote:
> Can you link to the bug you are referencing? With a bug to point to, it'll be easier to push for this to land.
The failed LIT tests in the remote tests are "x64 debian > LLVM.CodeGen/RISCV::atomic-fence.ll", "x64 windows > LLVM.CodeGen/RISCV::atomic-fence.ll", "x64 windows > LLVM.CodeGen/XCore::threads.ll", I think you can see them on this page.
The bug "X86::Int_MemBarrier should be a MetaInstruction" is an //internal// bug, I found it when I was doing some development work about debug info personally. Although I could not give a failed test, here is a way to trigger that:
define dso_local i32 @main() !dbg !7 {
entry:
fence acquire, !dbg !9
fence release, !dbg !9
%retval = alloca i32, align 4
store i32 0, i32* %retval, align 4
ret i32 0, !dbg !9
}
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3, !4, !5}
!llvm.ident = !{!6}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 11.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: DebugDirectivesOnly, enums: !2, splitDebugInlining: false, nameTableKind: None)
!1 = !DIFile(filename: "none.c", directory: "/temp")
!2 = !{}
!3 = !{i32 2, !"PersonalFlag", i32 1}
!4 = !{i32 2, !"Debug Info Version", i32 3}
!5 = !{i32 1, !"wchar_size", i32 4}
!6 = !{!"clang version 11.0.0"}
!7 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
!8 = !DISubroutineType(types: !2)
!9 = !DILocation(line: 1, column: 14, scope: !7)
llc -O0 -mtriple x86_64-linux-gnu test.ll
IR `fence acquire` and `fence release` is lowered to `X86::Int_MemBarrier`, and the interface `bool isMetaInstruction() const` returns //false// for it. So if you add an assert
for this, the program will crash.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92842/new/
https://reviews.llvm.org/D92842
More information about the llvm-commits
mailing list