Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM assertion showing Dict of Union{} #15453

Closed
JeffBezanson opened this issue Mar 11, 2016 · 6 comments
Closed

LLVM assertion showing Dict of Union{} #15453

JeffBezanson opened this issue Mar 11, 2016 · 6 comments
Labels
compiler:codegen Generation of LLVM IR and native code kind:regression Regression in behavior compared to a previous version needs tests Unit tests are required for this change

Comments

@JeffBezanson
Copy link
Sponsor Member

julia> Dict{Union{},Union{}}()
julia: /home/jeff/src/julia-master/julia/deps/srccache/llvm-3.7.1/lib/CodeGen/LiveVariables.cpp:114: void llvm::LiveVariables::MarkVirtRegAliveInBlock(llvm::LiveVariables::VarInfo&, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, std::vector<llvm::MachineBasicBlock*>&): Assertion `MBB != &MF->front() && "Can't find reaching def for virtreg"' failed.
Aborted (core dumped)

Works in 0.4.

@JeffBezanson JeffBezanson added kind:regression Regression in behavior compared to a previous version compiler:codegen Generation of LLVM IR and native code labels Mar 11, 2016
@vtjnash
Copy link
Sponsor Member

vtjnash commented Mar 11, 2016

seems to work for me (llvm 3.3 and 3.7.1 on OS X). is this perhaps a llvm regression or linux-specific?

@Keno
Copy link
Member

Keno commented Mar 11, 2016

I can reproduce this on both Linux/OSX with

override LLVM_ASSERTIONS=1
override USE_LLVM_SHLIB=1

@yuyichao
Copy link
Contributor

With julia-debug

julia> Dict{Union{},Union{}}()
Instruction does not dominate all uses!
  %840 = call %jl_value_t* @jl_apply_generic(%jl_value_t** %34, i32 3), !dbg !222
  store %jl_value_t* %840, %jl_value_t** %286, !dbg !234
LLVM ERROR: Broken function found, compilation aborted!

@vtjnash
Copy link
Sponsor Member

vtjnash commented Mar 11, 2016

ah, ok. it seems i couldn't reproduce because i was on the #15444 branch (in particular, that branch never uses SSA values directly for variables and lets mem2reg make them SSA only if it considers that possible )

@JeffBezanson
Copy link
Sponsor Member Author

fixed by #15444.

@tkelman tkelman added the needs tests Unit tests are required for this change label Mar 12, 2016
@tkelman
Copy link
Contributor

tkelman commented Mar 12, 2016

add as a test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:codegen Generation of LLVM IR and native code kind:regression Regression in behavior compared to a previous version needs tests Unit tests are required for this change
Projects
None yet
Development

No branches or pull requests

5 participants