[llvm] [DirectX] add GEP i8 legalization (PR #142475)
Sarah Spall via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 2 13:26:55 PDT 2025
================
@@ -175,25 +207,35 @@ static void upcastI8AllocasAndUses(Instruction &I,
Type *SmallestType = nullptr;
- for (User *U : AI->users()) {
- auto *Load = dyn_cast<LoadInst>(U);
- if (!Load)
- continue;
+ auto ProcessLoad = [&](LoadInst *Load) {
for (User *LU : Load->users()) {
Type *Ty = nullptr;
- if (auto *Cast = dyn_cast<CastInst>(LU))
+ if (auto *Cast = dyn_cast<CastInst>(LU)) {
----------------
spall wrote:
unnecessary braces?
https://github.com/llvm/llvm-project/pull/142475
More information about the llvm-commits
mailing list