This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Mark sin/cos load folding as modifying the function.
ClosedPublic

Authored by MJDSys on Nov 12 2020, 10:22 PM.

Details

Summary

When the load value is folded into the sin/cos operation, the
AMDGPU library calls simplifier could still mark the function
as unmodified. Instead ensure if there is an early return,
return whether the load was folded into the sin/cos call.

Diff Detail

Event Timeline

MJDSys created this revision.Nov 12 2020, 10:22 PM
MJDSys requested review of this revision.Nov 12 2020, 10:22 PM

Is this an observable problem?

I saw this issue when playing with the OpenMM OpenCL test suite with Mesa/Clover. I was using a copy of LLVM with assertions turned on, and it gave me an error about a pass modifying its inputs without marking its inputs as changed.

This revision is now accepted and ready to land.Nov 13 2020, 9:51 AM

Thanks for the review. Can you please commit this patch? I do not have access.

Thanks for the review. Can you please commit this patch? I do not have access.

Sure, will submit shortly. Thanks for the patch!

This revision was landed with ongoing or failed builds.Nov 13 2020, 2:49 PM
This revision was automatically updated to reflect the committed changes.