Skip to content

Commit

Permalink
Attributor: Do not treat pointer vectors of valid for unsupported att…
Browse files Browse the repository at this point in the history
…ributes

The memory attributes, noalias, and dereferenceable do not support
vectors of pointers according to the IR verifier, so don't report
them as valid.
  • Loading branch information
arsenm committed Dec 26, 2024
1 parent c760671 commit ce58312
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions llvm/include/llvm/Transforms/IPO/Attributor.h
Original file line number Diff line number Diff line change
Expand Up @@ -3853,7 +3853,7 @@ struct AANoAlias

/// See AbstractAttribute::isValidIRPositionForInit
static bool isValidIRPositionForInit(Attributor &A, const IRPosition &IRP) {
if (!IRP.getAssociatedType()->isPtrOrPtrVectorTy())
if (!IRP.getAssociatedType()->isPointerTy())
return false;
return IRAttribute::isValidIRPositionForInit(A, IRP);
}
Expand Down Expand Up @@ -4220,7 +4220,7 @@ struct AADereferenceable

/// See AbstractAttribute::isValidIRPositionForInit
static bool isValidIRPositionForInit(Attributor &A, const IRPosition &IRP) {
if (!IRP.getAssociatedType()->isPtrOrPtrVectorTy())
if (!IRP.getAssociatedType()->isPointerTy())
return false;
return IRAttribute::isValidIRPositionForInit(A, IRP);
}
Expand Down Expand Up @@ -4364,7 +4364,7 @@ struct AANoCapture

/// See AbstractAttribute::isValidIRPositionForInit
static bool isValidIRPositionForInit(Attributor &A, const IRPosition &IRP) {
if (!IRP.getAssociatedType()->isPtrOrPtrVectorTy())
if (!IRP.getAssociatedType()->isPointerTy())
return false;
return IRAttribute::isValidIRPositionForInit(A, IRP);
}
Expand Down Expand Up @@ -4636,7 +4636,7 @@ struct AAMemoryBehavior
/// See AbstractAttribute::isValidIRPositionForInit
static bool isValidIRPositionForInit(Attributor &A, const IRPosition &IRP) {
if (!IRP.isFunctionScope() &&
!IRP.getAssociatedType()->isPtrOrPtrVectorTy())
!IRP.getAssociatedType()->isPointerTy())
return false;
return IRAttribute::isValidIRPositionForInit(A, IRP);
}
Expand Down

0 comments on commit ce58312

Please sign in to comment.