This is an archive of the discontinued LLVM Phabricator instance.

[Polly] Fix test case after rL271151
ClosedPublic

Authored by sanjoy on May 28 2016, 10:39 PM.

Details

Summary

After rL271151 (SCEV change) SCEV no longer unconditionally transfers
nuw/nsw from the increment operation to the post-inc value; this
transfer only happens if there is undefined behavior in the program if
the increment overflowed (as opposed to just generating poison).

The loops in wraping_signed_expr_1.ll are in non-canonical
form (they're not rotated), and that defeats LLVM's poison-is-UB
analysis. IMO the easiest fix here is to run wraping_signed_expr_1.ll
through -loop-rotate to canonicalize the loops, which is what this
patch does.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy updated this revision to Diff 58909.May 28 2016, 10:39 PM
sanjoy retitled this revision from to [Polly] Fix test case after rL271151.
sanjoy updated this object.
sanjoy added reviewers: grosser, jdoerfert, Meinersbur.
sanjoy added a subscriber: pollydev.
grosser edited edge metadata.May 28 2016, 11:15 PM
grosser added a subscriber: grosser.

HI Sanjoy,

thanks for immediately coming up with a patch. We indeed have three
choices. Either rotating the loops, update the CHECK line to reflect the
new behavior or to add both test cases to Polly.

Johanne has a better overview of what exactly is already covered by
other tests so I let him take this over.

Best,
Tobias

sanjoy updated this revision to Diff 58922.May 29 2016, 3:32 PM
sanjoy edited edge metadata.

Remove XFAIL from test case as part of this change

jdoerfert accepted this revision.Jun 2 2016, 4:07 AM
jdoerfert edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jun 2 2016, 4:07 AM
This revision was automatically updated to reflect the committed changes.