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

[licm] LICM invalidates alias analysis info and uses broken information #792

Closed
lattner opened this issue Aug 15, 2004 · 4 comments
Closed
Assignees
Labels
bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead

Comments

@lattner
Copy link
Collaborator

lattner commented Aug 15, 2004

Bugzilla Link 420
Resolution FIXED
Resolved on Feb 22, 2010 12:51
Version 1.3
OS All
Attachments Testcase that causes the crash

Extended Description

gccld on 253.perlbmk crashes when run on persephone, because the LICM pass is
promoting a memory location out of a loop, and not updating the alias analysis.

The problem is that LICM uses a call to PromoteMemToReg to do all of the heavy
lifting and insertion of PHI nodes. Unfortunately, this causes some reasonably
large churn to the code and the alias analysis impl (glocalsmodref-aa in this
case) is not informed. Later, the stale information is used by LICM and a crash
results.

I will attach a reduced testcase for the problem.

-Chris

@lattner
Copy link
Collaborator Author

lattner commented Aug 15, 2004

assigned to @lattner

@lattner
Copy link
Collaborator Author

lattner commented Sep 14, 2004

Here is a reduced testcase:


%PL_regcomp_parse = internal global sbyte* null

implementation

void %test() {
br label %Outer
Outer:
br label %Inner
Inner:
%tmp.114.i.i.i = load sbyte** %PL_regcomp_parse
%tmp.115.i.i.i = load sbyte* %tmp.114.i.i.i

store sbyte* null, sbyte** %PL_regcomp_parse

    br bool false, label %Inner, label %Next

Next:
br bool false, label %Outer, label %Exit
Exit:
ret void
}


$ llvm-as < llvm/llvm-bugzilla-archive#420 .ll | valgrind opt -globalsmodref-aa -licm -disable-output

@lattner
Copy link
Collaborator Author

lattner commented Sep 15, 2004

*** Bug llvm/llvm-bugzilla-archive#439 has been marked as a duplicate of this bug. ***

@lattner
Copy link
Collaborator Author

lattner commented Sep 15, 2004

This is now fixed, testcase here:
test/Regression/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.llx

Patches here:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040913/018323.html
...
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040913/018328.html

-Chris

@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
Projects
None yet
Development

No branches or pull requests

1 participant