Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions llvm/lib/Target/AArch64/AArch64ISelLowering.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ class AArch64TargetLowering : public TargetLowering {
return true;
}

bool isCtlzFast() const override { return true; }

bool isMaskAndCmp0FoldingBeneficial(const Instruction &AndI) const override;

bool hasAndNotCompare(SDValue V) const override {
Expand Down
4 changes: 4 additions & 0 deletions llvm/lib/Target/ARM/ARMISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21387,6 +21387,10 @@ bool ARMTargetLowering::isCheapToSpeculateCtlz(Type *Ty) const {
return Subtarget->hasV6T2Ops();
}

bool ARMTargetLowering::isCtlzFast() const {
return Subtarget->hasV5TOps() && !Subtarget->isThumb1Only();
}

bool ARMTargetLowering::isMaskAndCmp0FoldingBeneficial(
const Instruction &AndI) const {
if (!Subtarget->hasV7Ops())
Expand Down
2 changes: 2 additions & 0 deletions llvm/lib/Target/ARM/ARMISelLowering.h
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,8 @@ class VectorType;
return Opc != ISD::VECREDUCE_ADD;
}

bool isCtlzFast() const override;

/// Returns true if an argument of type Ty needs to be passed in a
/// contiguous block of registers in calling convention CallConv.
bool functionArgumentNeedsConsecutiveRegisters(
Expand Down