[PATCH] D17429: Don't mark convergent instructions as trivially rematerializable.

escha via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 21:39:48 PST 2016


escha added a subscriber: escha.
escha added a comment.

I think any GPU register SIMD operation counts as convergent and trivially rematerializable as long as it doesn't have side-effects (even if it probably wouldn't be particularly useful to in most cases).

example: a hypothetical f32reduce x, y that summed the values of 'y' for all the threads in a warp and saved the result in x.

It's convergent because you need to run it when all the relevant threads are enabled, but it doesn't have any side-effects, so if the same vreg representing 'y' is still available unmodified and control flow is the same, you could repeat it, I think.


http://reviews.llvm.org/D17429





More information about the llvm-commits mailing list