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
Created attachment 164 [details] Testcase that causes the crash Reproduce the problem with: llvm-as bugpoint-reduced-simplified.ll valgrind opt bugpoint-reduced-simplified.bc -globalsmodref-aa -licm -disable-output -Chris
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 < PR420.ll | valgrind opt -globalsmodref-aa -licm -disable-output
*** Bug 439 has been marked as a duplicate of this bug. ***
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