You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct Iter end
Base.iterate(::Iter) = (1, nothing)
Base.iterate(::Iter, ::Any) =nothingfunctionfoo()
ind =0for x in (1,)
for y inIter()
ind +=1endendendcode_llvm(foo, Tuple{})
gives
PHI node has multiple entries for the same basic block with different incoming values!
%value_phi2 = phi i64 [ %36, %L11 ], [ %37, %L11 ], [ %value_phi, %L5.L13_crit_edge ]
label %L11
%37 = load i64, i64* %8, align 8, !dbg !28, !tbaa !21
%36 = load i64, i64* %8, align 8, !dbg !28, !tbaa !21
LLVM ERROR: Broken function found, compilation aborted!
Tentatively assigning @Keno whom I suspect to be the best one to fix this.
The text was updated successfully, but these errors were encountered:
It is possible, after optimziations for the two branches of a conditional
to go to the same basic block. We have an IR invariant that requires the
incoming value to be the same for both incoming edges in this case. LLVM
has the same invariant. However, translating from a julia-incoming-value
to an LLVM one may require additional code generation, and without further
GVN, LLVM does not know that the two values are identical and thus believes
its invariants are violated. The fix is relatively straightforward. Since
we don't have user-inserted switch terminators, we can simply emit a
conditional branch with equal successors as unconditional branches and
skip codegening one of the phi paths. This avoids the issue and also
generates less code in this case.
Fixes#27594
It is possible, after optimziations for the two branches of a conditional
to go to the same basic block. We have an IR invariant that requires the
incoming value to be the same for both incoming edges in this case. LLVM
has the same invariant. However, translating from a julia-incoming-value
to an LLVM one may require additional code generation, and without further
GVN, LLVM does not know that the two values are identical and thus believes
its invariants are violated. The fix is relatively straightforward. Since
we don't have user-inserted switch terminators, we can simply emit a
conditional branch with equal successors as unconditional branches and
skip codegening one of the phi paths. This avoids the issue and also
generates less code in this case.
Fixes#27594
Reduced from the problem I've observed in #27434 (comment).
gives
Tentatively assigning @Keno whom I suspect to be the best one to fix this.
The text was updated successfully, but these errors were encountered: