There is literally no way to know other than to try them. There's enough variation in distance/angle from center of axle to center of derailleur mount to make a difference of a few teeth compatibility. I've had mtb derailleurs bump a 34t cog. We've got the 29ers in our shop with 36t cogs equipped with new Shimano mtb derailleurs and they don't hit the cog. Again, try and see.
I posted the same question a while back. Are you talking about the new shimano SLX 36 tooth cassette in the 9 speed? I think one of the solutions was to get a longer b limit screw to get the cog away fro the 36 gear. I think it would really max out the springs, let us know how it works out.