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

dag combine induces cycle when folding c ? (load p) : (load q) #1486

Closed
asl opened this issue Jan 16, 2007 · 5 comments
Closed

dag combine induces cycle when folding c ? (load p) : (load q) #1486

asl opened this issue Jan 16, 2007 · 5 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead llvm:codegen

Comments

@asl
Copy link
Collaborator

asl commented Jan 16, 2007

Bugzilla Link 1114
Resolution FIXED
Resolved on Feb 22, 2010 12:53
Version 1.7
OS All
Attachments Failed bytecode

Extended Description

./llc bugpoint-reduced-simplified.bc
llc: /home/asl/proj/llvm/src/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:336: void
::SelectionDAGLegalize::LegalizeDAG(): Assertion `Order.size() ==
Visited.size() && Order.size() == (unsigned)std::distance(DAG.allnodes_begin(),
DAG.allnodes_end()) && "Error: DAG is cyclic!"' failed.

This is reduction from Mozilla.

@asl
Copy link
Collaborator Author

asl commented Jan 16, 2007

assigned to @lattner

@lattner
Copy link
Collaborator

lattner commented Jan 16, 2007

looks like a dag combine issue.

@lattner
Copy link
Collaborator

lattner commented Jan 16, 2007

reduced testcase:

declare i1 %foo()

define i32 %test(i32* %A, i32* %B) {
%a = load i32* %A
%b = load i32* %B
%cond = call i1 %foo()
%c = select i1 %cond, i32 %a, i32 %b
ret i32 %c
}

@lattner
Copy link
Collaborator

lattner commented Jan 16, 2007

Fixed. Testcase here: CodeGen/Generic/2007-01-15-LoadSelectCycle.ll

Patch here:

-Chris

@lattner
Copy link
Collaborator

lattner commented Jan 16, 2007

no really! patch here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-
Mon-20070115/042758.html

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead llvm:codegen
Projects
None yet
Development

No branches or pull requests

2 participants