[MLIR][XLA] Allow for choice of safe/unsafe variant in broadcast utils
[MLIR][XLA] Allow for choice of safe/unsafe variant in broadcast utils

Create safe or unsafe variants of `shape.broadcast` depending on the context.
The representation by means of an extent tensor is only legal if the operands
are known to be broadcastable. Currently, there is no use in a safe context in
the codebase but it will be used for shape inference eventually.

PiperOrigin-RevId: 325228073

iree-org/iree,iree-org/iree,google/iree,google/iree,iree-org/iree,iree-org/iree,iree-org/iree,google/iree,iree-org/iree,google/iree,google/iree,google/iree,iree-org/iree,google/iree