[PATCH] D17526: [LoopUnroll] Respect the convergent attribute.
Michael Zolotukhin via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 11 18:27:36 PST 2016
mzolotukhin accepted this revision.
mzolotukhin added a reviewer: mzolotukhin.
mzolotukhin added a comment.
This revision is now accepted and ready to land.
Hi Justin,
The patch looks good to me, but maybe we need to add a test with pragma and convergent call - I think it's uncovered now.
Michael
================
Comment at: lib/Transforms/Utils/LoopUnroll.cpp:275-278
@@ -263,1 +274,6 @@
+ );
+ // Don't output the runtime loop prolog if Count is a multiple of
+ // TripMultiple. Such a prolog is never needed, and is unsafe if the loop
+ // contains a convergent instruction.
+ if (RuntimeTripCount && TripMultiple % Count != 0 &&
!UnrollRuntimeLoopProlog(L, Count, AllowExpensiveTripCount, LI, SE, DT,
----------------
I think this should go in a separate commit.
http://reviews.llvm.org/D17526
More information about the llvm-commits
mailing list