[llvm-branch-commits] [llvm] [SelectionDAGBuilder] Use address width when lowering ptrtoaddr (PR #139423)
Alexander Richardson via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat May 10 17:33:14 PDT 2025
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/139423
>From d4520dc202a500c80309cf09517b2a2823bf13ab Mon Sep 17 00:00:00 2001
From: Alex Richardson <alexrichardson at google.com>
Date: Sat, 10 May 2025 17:33:01 -0700
Subject: [PATCH] remove unused variable
Created using spr 1.3.6-beta.1
---
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 806bab5379bde..66b11030ce5a5 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -3885,10 +3885,8 @@ void SelectionDAGBuilder::visitPtrToAddr(const User &I) {
SDValue N = getValue(I.getOperand(0));
Type *PtrTy = I.getOperand(0)->getType();
EVT AddrVT = EVT::getIntegerVT(Ctx, DL.getPointerAddressSizeInBits(PtrTy));
- if (auto *VTy = dyn_cast<VectorType>(PtrTy)) {
- Type *EltTy = VTy->getElementType();
+ if (auto *VTy = dyn_cast<VectorType>(PtrTy))
AddrVT = EVT::getVectorVT(Ctx, AddrVT, VTy->getElementCount());
- }
N = DAG.getPtrExtOrTrunc(N, getCurSDLoc(), AddrVT);
N = DAG.getZExtOrTrunc(N, getCurSDLoc(), TLI.getValueType(DL, I.getType()));
setValue(&I, N);
More information about the llvm-branch-commits
mailing list