[all-commits] [llvm/llvm-project] 6d4cd3: [GlobalISel] Support the byte type in the IRTransl...
Anshil Gandhi via All-commits
all-commits at lists.llvm.org
Fri Jun 5 03:06:26 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6d4cd34d861baec5a761d15b81395fbe88f4391b
https://github.com/llvm/llvm-project/commit/6d4cd34d861baec5a761d15b81395fbe88f4391b
Author: Anshil Gandhi <95053726+gandhi56 at users.noreply.github.com>
Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths:
M llvm/docs/Frontend/PerformanceTips.rst
M llvm/docs/GlobalISel/GMIR.rst
M llvm/docs/GlobalISel/IRTranslator.rst
M llvm/docs/LangRef.rst
M llvm/docs/ReleaseNotes.md
M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
M llvm/lib/CodeGen/LowLevelTypeUtils.cpp
M llvm/test/CodeGen/AMDGPU/GlobalISel/amdgpu-irtranslator.ll
A llvm/test/CodeGen/Generic/GlobalISel/irtranslator-byte-type.ll
M llvm/test/CodeGen/PowerPC/fast-isel-cmp-imm.ll
Log Message:
-----------
[GlobalISel] Support the byte type in the IRTranslator (#196125)
> [!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 at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list