Matching power of 2 constants

Hi, I’m still very new to mlir and pdl and y’all have done a great job!
I think I should be using attributes, creating my own attribute in ODS/C++ and then using that in a pdl attribute op to restrict the constant to be only powers of 2, but the more I’m reading/trying out I’m not sure this is the right way.

if this is possible, how would I connect my attribute to arith constantOp (or maybe there is an existing attribute I missed).

If I’m going in the wrong direction or thinking about this incorrectly please let me know!