[MLIR][IntRange] Materialize known constant values only when the value type is integer-like (#196133)
This patch came out of
https://discourse.llvm.org/t/request-for-advice-in-updating-intrange-optimziations/90685
In short, my out-of-tree dialect has region-bearing operations whose
return-like terminators semantically wrap an integer type in a
non-integer type when returning to the parent for control flow (also
this dialect that has no constant materializer). In this case,
`MaterializeKnownConstantValues` will attempt to construct integer
attributes using those non-integer types, which causes a stack trace and
prevents us from using int range optimizations on IR that contains these
ops.
This patch adds guards to the materialization step, so that if the value
that is inferred to be constant is not an integer (or shaped container
with an integer element type), no materialization is attempted.