This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fold readlane intrinsics of constants
ClosedPublic

Authored by arsenm on Jun 12 2019, 12:49 PM.

Details

Reviewers
rampitec
nhaehnle
Summary

I'm not 100% sure about this, since I'm worried about IR transforms
that might end up introducing divergence downstream once replaced with
a constant, but I haven't come up with an example yet.

Diff Detail

Event Timeline

arsenm created this revision.Jun 12 2019, 12:49 PM

How this can even happen? Someone needs to use an intrinsic on a literal? This use doesn't make a lot of sense. Do you have a real example of such use?

How this can even happen? Someone needs to use an intrinsic on a literal? This use doesn't make a lot of sense. Do you have a real example of such use?

You can use readfirstlane to effectively assert that a function argument must be uniform. After inlining, it might see a constant

This revision is now accepted and ready to land.Jun 12 2019, 1:13 PM
arsenm closed this revision.Jun 14 2019, 7:48 AM

r363406