[llvm-bugs] [Bug 45565] New: failed assertion in Live Variable Analysis with callbr w/ outputs
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Apr 15 15:42:39 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45565
Bug ID: 45565
Summary: failed assertion in Live Variable Analysis with callbr
w/ outputs
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Global Analyses
Assignee: unassignedbugs at nondot.org
Reporter: ndesaulniers at google.com
CC: efriedma at quicinc.com, isanbard at gmail.com,
llvm-bugs at lists.llvm.org, srhines at google.com
Blocks: 4068
llc -O2 futex.ll:
```
@c = dso_local local_unnamed_addr global i32 0, align 4
@a = dso_local local_unnamed_addr global i32 0, align 4
define dso_local i32 @b(i32* nocapture %f) #0 {
entry:
%0 = callbr i32 asm "", "=r,X,~{dirflag},~{fpsr},~{flags}"(i8*
blockaddress(@b, %e))
to label %asm.fallthrough [label %e]
asm.fallthrough: ; preds = %entry
store i32 %0, i32* %f, align 4
br label %e
e: ; preds = %asm.fallthrough,
%entry
ret i32 undef
}
define dso_local i32 @futex_lock_pi_atomic() local_unnamed_addr {
entry:
%0 = callbr i32 asm "", "=r,X,~{dirflag},~{fpsr},~{flags}"(i8*
blockaddress(@futex_lock_pi_atomic, %b.exit)) #2
to label %asm.fallthrough.i [label %b.exit]
asm.fallthrough.i: ; preds = %entry
br label %b.exit
b.exit: ; preds = %entry,
%asm.fallthrough.i
%1 = load i32, i32* @c, align 4
%2 = tail call { i32, i32 } asm "",
"=r,={ax},1,0,~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 %1)
%asmresult = extractvalue { i32, i32 } %2, 0
%asmresult1 = extractvalue { i32, i32 } %2, 1
store i32 %asmresult, i32* @c, align 4
store i32 %asmresult1, i32* @a, align 4
ret i32 undef
}
```
llc: ../lib/CodeGen/LiveVariables.cpp:114: void
llvm::LiveVariables::MarkVirtRegAliveInBlock(llvm::LiveVariables::VarInfo &,
llvm::MachineBasicBlock *, llvm::MachineBasicBlock *,
std::vector<MachineBasicBlock *> &): Assertion `MBB != &MF->front() && "Can't
find reaching def for virtreg"' failed.
1. Running pass 'Function Pass Manager' on module 'futex.ll'.
2. Running pass 'Live Variable Analysis' on function
'@futex_lock_pi_atomic'
...
#9 0x00000000035d4d1e llvm::LiveVariables::HandleVirtRegUse(unsigned int,
llvm::MachineBasicBlock*, llvm::MachineInstr&)
(/android0/llvm-project/llvm/build/bin/llc+0x35d4d1e)
#10 0x00000000035d746e llvm::LiveVariables::runOnInstr(llvm::MachineInstr&,
llvm::SmallVectorImpl<unsigned int>&)
(/android0/llvm-project/llvm/build/bin/llc+0x35d746e)
#11 0x00000000035d7a4c
llvm::LiveVariables::runOnBlock(llvm::MachineBasicBlock*, unsigned int)
(/android0/llvm-project/llvm/build/bin/llc+0x35d7a4c)
#12 0x00000000035d82a1
llvm::LiveVariables::runOnMachineFunction(llvm::MachineFunction&)
(/android0/llvm-project/llvm/build/bin/llc+0x35d82a1)
#13 0x000000000363fd0a
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/android0/llvm-project/llvm/build/bin/llc+0x363fd0a)
#14 0x0000000003a1cc74 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/android0/llvm-project/llvm/build/bin/llc+0x3a1cc74)
#15 0x0000000003a1cf28 llvm::FPPassManager::runOnModule(llvm::Module&)
(/android0/llvm-project/llvm/build/bin/llc+0x3a1cf28)
#16 0x0000000003a1d57d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/android0/llvm-project/llvm/build/bin/llc+0x3a1d57d)
#17 0x00000000022b9618 main
(/android0/llvm-project/llvm/build/bin/llc+0x22b9618)
...
Referenced Bugs:
https://bugs.llvm.org/show_bug.cgi?id=4068
[Bug 4068] [Meta] Compiling the Linux kernel with clang
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200415/19905dcf/attachment.html>
More information about the llvm-bugs
mailing list