Skip to content

Conversation

@topperc
Copy link
Collaborator

@topperc topperc commented Dec 11, 2025

isIntegerTy is only true for scalars.

…sIntegerTy. NFC

isIntegerTy is only true for scalars.
@topperc topperc requested review from arsenm and nikic December 11, 2025 18:16
@llvmbot llvmbot added the llvm:SelectionDAG SelectionDAGISel as well label Dec 11, 2025
@llvmbot
Copy link
Member

llvmbot commented Dec 11, 2025

@llvm/pr-subscribers-llvm-selectiondag

Author: Craig Topper (topperc)

Changes

isIntegerTy is only true for scalars.


Full diff: https://github.com/llvm/llvm-project/pull/171880.diff

1 Files Affected:

  • (modified) llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp (+1-1)
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
index 098005b6adfa2..024441d7cfac2 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -442,7 +442,7 @@ FunctionLoweringInfo::GetLiveOutRegInfo(Register Reg, unsigned BitWidth) {
 /// register based on the LiveOutInfo of its operands.
 void FunctionLoweringInfo::ComputePHILiveOutRegInfo(const PHINode *PN) {
   Type *Ty = PN->getType();
-  if (!Ty->isIntegerTy() || Ty->isVectorTy())
+  if (!Ty->isIntegerTy())
     return;
 
   SmallVector<EVT, 1> ValueVTs;

void FunctionLoweringInfo::ComputePHILiveOutRegInfo(const PHINode *PN) {
Type *Ty = PN->getType();
if (!Ty->isIntegerTy() || Ty->isVectorTy())
if (!Ty->isIntegerTy())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it meant isIntOrIntVectorTy?

Copy link
Collaborator Author

@topperc topperc Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of the code in this function doesn't support vectors. We only want scalar integer types to get through this check. That's already covered by isIntegerTy.

@topperc topperc requested a review from arsenm December 11, 2025 20:20
@topperc topperc merged commit 98a8072 into llvm:main Dec 11, 2025
12 checks passed
@topperc topperc deleted the pr/redundant-check branch December 11, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm:SelectionDAG SelectionDAGISel as well

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants