If you want to enforce this, you can compare the types below to shape::getExtentTensorType.
Maybe test this with one shape of statically known rank?
Name, e.g. I
I'm going to land this with these changes because the code was already in another commit and didn't receive any strong negative feedback, so I'm hoping there are only nits left if anything. I will follow up on any comments.
Right now this is enforced by checking that neither input is a Shape. I'm going to leave this to ease future find replace when this is changed because I copied this from Broadcast lowering in this file.