https://bugs.llvm.org/show_bug.cgi?id=49967
Nikita Popov <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
CC| |[email protected]
Status|NEW |RESOLVED
--- Comment #1 from Nikita Popov <[email protected]> ---
I've added the test case in
https://github.com/llvm/llvm-project/commit/6e8e165085d4506d3df15da79f70abe1237a26ba.
Here's a trace of what happens in this case:
Fetching: %inc89 = add nuw nsw i16 %i58.010, 1
Fetching: i16 1
Reused: 1
Fetching: i16 1
Reused: 1
Fetching: %i58.010 = phi i16 [ 32, %vector.ph ], [ %inc89, %for.body63 ]
Reused: {32,+,1}<nuw><nsw><%for.body63>
Created: {33,+,1}<nuw><nsw><%for.body63>
Fetching: i16 33
Reused: 33
B Invalidating: %i58.010 = phi i16 [ 32, %vector.ph ], [ %inc89, %for.body63
] - {32,+,1}<nuw><nsw><%for.body63>
B Invalidating: %inc89 = add nuw nsw i16 %i58.010, 1 -
{33,+,1}<nuw><nsw><%for.body63>
B Skipping: %i58.010 = phi i16 [ 32, %vector.ph ], [ %inc89, %for.body63 ]
B Skipping: %exitcond12.not = icmp eq i16 %inc89, 33
B Skipping: br i1 %exitcond12.not, label %for.cond.cleanup62, label
%for.body63
Created: {33,+,1}<nuw><nsw><%for.body63>
getBackedgeTakenInfo() will invalidate values in the loop when it first
computes BE counts. In this case, this happens while computing the SCEV for the
post-inc addrec. As a result, the post-inc addrec will be cached, without the
pre-inc addrec (corresponding to the loop header phi) being cached.
This goes against the basic assumption of my patch, that the loop header phi
will always have a cached value if there is a cached expression based on it.
I'll have to find some other way to solve my original motivation.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs