> [!NOTE]
> Stacked: this PR is the base of a 2-PR stack.
> - **#196125 (this PR)** — GlobalISel byte-type support (lands first)
> - **#177908** — LoadStoreVectorizer mixed-type support (depends on
this; rebased on top)
Mirror SelectionDAG's behaviour by treating byte as integer at the
IR-to-MIR boundary:
- `getLLTForType` maps ByteType to `LLT::integer(N)`, matching the
byte->integer EVT mapping in ValueTypes.cpp.
- `translate(Constant)` handles ConstantByte by routing through
buildConstant with the underlying APInt.
- `translateBitCast` redirects only **scalar** byte<->ptr crossings to
G_INTTOPTR / G_PTRTOINT (the well-typed MIR shape for that boundary).
Vector byte<->ptr (e.g. `<N x b32>` -> ptr produced by mixed-type load
coalescing in #177908) and other legacy ptr/non-ptr IR bitcasts (AMDGPU
iN<->p3 kernarg packing, etc.) keep their historical G_BITCAST lowering
— G_INTTOPTR has no vector-src -> scalar-ptr form.
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>