Skip to content

Commit 1b5e1cc

Browse files
committed
tune
1 parent f82e080 commit 1b5e1cc

26 files changed

+105
-83
lines changed

llvm/include/llvm/Analysis/InlineCost.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ const char MaxInlineStackSizeAttributeName[] = "inline-max-stacksize";
6565
// The cost-benefit pair computed by cost-benefit analysis.
6666
class CostBenefitPair {
6767
public:
68-
CostBenefitPair(APInt Cost, APInt Benefit) : Cost(Cost), Benefit(Benefit) {}
68+
CostBenefitPair(APInt Cost, APInt Benefit)
69+
: Cost(std::move(Cost)), Benefit(std::move(Benefit)) {}
6970

7071
const APInt &getCost() const { return Cost; }
7172

llvm/include/llvm/Analysis/MemoryBuiltins.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ template <typename T, class C> struct SizeOffsetType {
196196
T Offset;
197197

198198
SizeOffsetType() = default;
199-
SizeOffsetType(T Size, T Offset) : Size(Size), Offset(Offset) {}
199+
SizeOffsetType(T Size, T Offset)
200+
: Size(std::move(Size)), Offset(std::move(Offset)) {}
200201

201202
bool knownSize() const { return C::known(Size); }
202203
bool knownOffset() const { return C::known(Offset); }
@@ -215,9 +216,10 @@ template <typename T, class C> struct SizeOffsetType {
215216
/// \p APInts.
216217
struct SizeOffsetAPInt : public SizeOffsetType<APInt, SizeOffsetAPInt> {
217218
SizeOffsetAPInt() = default;
218-
SizeOffsetAPInt(APInt Size, APInt Offset) : SizeOffsetType(Size, Offset) {}
219+
SizeOffsetAPInt(APInt Size, APInt Offset)
220+
: SizeOffsetType(std::move(Size), std::move(Offset)) {}
219221

220-
static bool known(APInt V) { return V.getBitWidth() > 1; }
222+
static bool known(const APInt &V) { return V.getBitWidth() > 1; }
221223
};
222224

223225
/// Evaluate the size and offset of an object pointed to by a Value*

llvm/include/llvm/Analysis/TargetTransformInfo.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -666,14 +666,15 @@ class TargetTransformInfo {
666666
IntrinsicInst & II) const;
667667
/// Can be used to implement target-specific instruction combining.
668668
/// \see instCombineIntrinsic
669-
std::optional<Value *> simplifyDemandedUseBitsIntrinsic(
670-
InstCombiner & IC, IntrinsicInst & II, APInt DemandedMask,
671-
KnownBits & Known, bool &KnownBitsComputed) const;
669+
std::optional<Value *>
670+
simplifyDemandedUseBitsIntrinsic(InstCombiner &IC, IntrinsicInst &II,
671+
const APInt &DemandedMask, KnownBits &Known,
672+
bool &KnownBitsComputed) const;
672673
/// Can be used to implement target-specific instruction combining.
673674
/// \see instCombineIntrinsic
674675
std::optional<Value *> simplifyDemandedVectorEltsIntrinsic(
675-
InstCombiner & IC, IntrinsicInst & II, APInt DemandedElts,
676-
APInt & UndefElts, APInt & UndefElts2, APInt & UndefElts3,
676+
InstCombiner &IC, IntrinsicInst &II, const APInt &DemandedElts,
677+
APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3,
677678
std::function<void(Instruction *, unsigned, APInt, APInt &)>
678679
SimplifyAndSetOp) const;
679680
/// @}
@@ -1826,11 +1827,12 @@ class TargetTransformInfo::Concept {
18261827
getPreferredTailFoldingStyle(bool IVUpdateMayOverflow = true) = 0;
18271828
virtual std::optional<Instruction *> instCombineIntrinsic(
18281829
InstCombiner &IC, IntrinsicInst &II) = 0;
1829-
virtual std::optional<Value *> simplifyDemandedUseBitsIntrinsic(
1830-
InstCombiner &IC, IntrinsicInst &II, APInt DemandedMask,
1831-
KnownBits & Known, bool &KnownBitsComputed) = 0;
1830+
virtual std::optional<Value *>
1831+
simplifyDemandedUseBitsIntrinsic(InstCombiner &IC, IntrinsicInst &II,
1832+
const APInt &DemandedMask, KnownBits &Known,
1833+
bool &KnownBitsComputed) = 0;
18321834
virtual std::optional<Value *> simplifyDemandedVectorEltsIntrinsic(
1833-
InstCombiner &IC, IntrinsicInst &II, APInt DemandedElts,
1835+
InstCombiner &IC, IntrinsicInst &II, const APInt &DemandedElts,
18341836
APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3,
18351837
std::function<void(Instruction *, unsigned, APInt, APInt &)>
18361838
SimplifyAndSetOp) = 0;
@@ -2278,14 +2280,14 @@ class TargetTransformInfo::Model final : public TargetTransformInfo::Concept {
22782280
}
22792281
std::optional<Value *>
22802282
simplifyDemandedUseBitsIntrinsic(InstCombiner &IC, IntrinsicInst &II,
2281-
APInt DemandedMask, KnownBits &Known,
2283+
const APInt &DemandedMask, KnownBits &Known,
22822284
bool &KnownBitsComputed) override {
22832285
return Impl.simplifyDemandedUseBitsIntrinsic(IC, II, DemandedMask, Known,
22842286
KnownBitsComputed);
22852287
}
22862288
std::optional<Value *> simplifyDemandedVectorEltsIntrinsic(
2287-
InstCombiner &IC, IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts,
2288-
APInt &UndefElts2, APInt &UndefElts3,
2289+
InstCombiner &IC, IntrinsicInst &II, const APInt &DemandedElts,
2290+
APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3,
22892291
std::function<void(Instruction *, unsigned, APInt, APInt &)>
22902292
SimplifyAndSetOp) override {
22912293
return Impl.simplifyDemandedVectorEltsIntrinsic(

llvm/include/llvm/Analysis/TargetTransformInfoImpl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,14 @@ class TargetTransformInfoImplBase {
194194

195195
std::optional<Value *>
196196
simplifyDemandedUseBitsIntrinsic(InstCombiner &IC, IntrinsicInst &II,
197-
APInt DemandedMask, KnownBits &Known,
197+
const APInt &DemandedMask, KnownBits &Known,
198198
bool &KnownBitsComputed) const {
199199
return std::nullopt;
200200
}
201201

202202
std::optional<Value *> simplifyDemandedVectorEltsIntrinsic(
203-
InstCombiner &IC, IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts,
204-
APInt &UndefElts2, APInt &UndefElts3,
203+
InstCombiner &IC, IntrinsicInst &II, const APInt &DemandedElts,
204+
APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3,
205205
std::function<void(Instruction *, unsigned, APInt, APInt &)>
206206
SimplifyAndSetOp) const {
207207
return std::nullopt;

llvm/include/llvm/CodeGen/BasicTTIImpl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,15 +675,15 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
675675

676676
std::optional<Value *>
677677
simplifyDemandedUseBitsIntrinsic(InstCombiner &IC, IntrinsicInst &II,
678-
APInt DemandedMask, KnownBits &Known,
678+
const APInt &DemandedMask, KnownBits &Known,
679679
bool &KnownBitsComputed) {
680680
return BaseT::simplifyDemandedUseBitsIntrinsic(IC, II, DemandedMask, Known,
681681
KnownBitsComputed);
682682
}
683683

684684
std::optional<Value *> simplifyDemandedVectorEltsIntrinsic(
685-
InstCombiner &IC, IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts,
686-
APInt &UndefElts2, APInt &UndefElts3,
685+
InstCombiner &IC, IntrinsicInst &II, const APInt &DemandedElts,
686+
APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3,
687687
std::function<void(Instruction *, unsigned, APInt, APInt &)>
688688
SimplifyAndSetOp) {
689689
return BaseT::simplifyDemandedVectorEltsIntrinsic(

llvm/include/llvm/CodeGen/SelectionDAG.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ class SelectionDAG {
883883

884884
/// Returns a vector of type ResVT whose elements contain the linear sequence
885885
/// <0, Step, Step * 2, Step * 3, ...>
886-
SDValue getStepVector(const SDLoc &DL, EVT ResVT, APInt StepVal);
886+
SDValue getStepVector(const SDLoc &DL, EVT ResVT, const APInt &StepVal);
887887

888888
/// Returns a vector of type ResVT whose elements contain the linear sequence
889889
/// <0, 1, 2, 3, ...>

llvm/include/llvm/IR/PatternMatch.h

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -843,9 +843,9 @@ struct bind_const_intval_ty {
843843
/// Match a specified integer value or vector of all elements of that
844844
/// value.
845845
template <bool AllowUndefs> struct specific_intval {
846-
APInt Val;
846+
const APInt &Val;
847847

848-
specific_intval(APInt V) : Val(std::move(V)) {}
848+
specific_intval(const APInt &V) : Val(V) {}
849849

850850
template <typename ITy> bool match(ITy *V) {
851851
const auto *CI = dyn_cast<ConstantInt>(V);
@@ -857,22 +857,37 @@ template <bool AllowUndefs> struct specific_intval {
857857
}
858858
};
859859

860+
template <bool AllowUndefs> struct specific_intval64 {
861+
uint64_t Val;
862+
863+
specific_intval64(uint64_t V) : Val(V) {}
864+
865+
template <typename ITy> bool match(ITy *V) {
866+
const auto *CI = dyn_cast<ConstantInt>(V);
867+
if (!CI && V->getType()->isVectorTy())
868+
if (const auto *C = dyn_cast<Constant>(V))
869+
CI = dyn_cast_or_null<ConstantInt>(C->getSplatValue(AllowUndefs));
870+
871+
return CI && CI->getValue() == Val;
872+
}
873+
};
874+
860875
/// Match a specific integer value or vector with all elements equal to
861876
/// the value.
862-
inline specific_intval<false> m_SpecificInt(APInt V) {
863-
return specific_intval<false>(std::move(V));
877+
inline specific_intval<false> m_SpecificInt(const APInt &V) {
878+
return specific_intval<false>(V);
864879
}
865880

866-
inline specific_intval<false> m_SpecificInt(uint64_t V) {
867-
return m_SpecificInt(APInt(64, V));
881+
inline specific_intval64<false> m_SpecificInt(uint64_t V) {
882+
return specific_intval64<false>(V);
868883
}
869884

870-
inline specific_intval<true> m_SpecificIntAllowUndef(APInt V) {
871-
return specific_intval<true>(std::move(V));
885+
inline specific_intval<true> m_SpecificIntAllowUndef(const APInt &V) {
886+
return specific_intval<true>(V);
872887
}
873888

874-
inline specific_intval<true> m_SpecificIntAllowUndef(uint64_t V) {
875-
return m_SpecificIntAllowUndef(APInt(64, V));
889+
inline specific_intval64<true> m_SpecificIntAllowUndef(uint64_t V) {
890+
return specific_intval64<true>(V);
876891
}
877892

878893
/// Match a ConstantInt and bind to its value. This does not match

llvm/include/llvm/MC/MCStreamer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ class MCStreamer {
740740
/// Special case of EmitValue that avoids the client having
741741
/// to pass in a MCExpr for constant integers.
742742
virtual void emitIntValue(uint64_t Value, unsigned Size);
743-
virtual void emitIntValue(APInt Value);
743+
virtual void emitIntValue(const APInt &Value);
744744

745745
/// Special case of EmitValue that avoids the client having to pass
746746
/// in a MCExpr for constant integers & prints in Hex format for certain

llvm/include/llvm/Transforms/InstCombine/InstCombiner.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,11 @@ class LLVM_LIBRARY_VISIBILITY InstCombiner {
348348

349349
// Call target specific combiners
350350
std::optional<Instruction *> targetInstCombineIntrinsic(IntrinsicInst &II);
351-
std::optional<Value *>
352-
targetSimplifyDemandedUseBitsIntrinsic(IntrinsicInst &II, APInt DemandedMask,
353-
KnownBits &Known,
354-
bool &KnownBitsComputed);
351+
std::optional<Value *> targetSimplifyDemandedUseBitsIntrinsic(
352+
IntrinsicInst &II, const APInt &DemandedMask, KnownBits &Known,
353+
bool &KnownBitsComputed);
355354
std::optional<Value *> targetSimplifyDemandedVectorEltsIntrinsic(
356-
IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts,
355+
IntrinsicInst &II, const APInt &DemandedElts, APInt &UndefElts,
357356
APInt &UndefElts2, APInt &UndefElts3,
358357
std::function<void(Instruction *, unsigned, APInt, APInt &)>
359358
SimplifyAndSetOp);

llvm/lib/Analysis/ConstantFolding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ Constant *llvm::ConstantFoldLoadFromConstPtr(Constant *C, Type *Ty,
751751
Constant *llvm::ConstantFoldLoadFromConstPtr(Constant *C, Type *Ty,
752752
const DataLayout &DL) {
753753
APInt Offset(DL.getIndexTypeSizeInBits(C->getType()), 0);
754-
return ConstantFoldLoadFromConstPtr(C, Ty, Offset, DL);
754+
return ConstantFoldLoadFromConstPtr(C, Ty, std::move(Offset), DL);
755755
}
756756

757757
Constant *llvm::ConstantFoldLoadFromUniformValue(Constant *C, Type *Ty) {

llvm/lib/Analysis/InstructionSimplify.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6105,7 +6105,8 @@ static Value *simplifyRelativeLoad(Constant *Ptr, Constant *Offset,
61056105
if (OffsetInt.srem(4) != 0)
61066106
return nullptr;
61076107

6108-
Constant *Loaded = ConstantFoldLoadFromConstPtr(Ptr, Int32Ty, OffsetInt, DL);
6108+
Constant *Loaded =
6109+
ConstantFoldLoadFromConstPtr(Ptr, Int32Ty, std::move(OffsetInt), DL);
61096110
if (!Loaded)
61106111
return nullptr;
61116112

@@ -6973,7 +6974,8 @@ Value *llvm::simplifyLoadInst(LoadInst *LI, Value *PtrOp,
69736974
if (PtrOp == GV) {
69746975
// Index size may have changed due to address space casts.
69756976
Offset = Offset.sextOrTrunc(Q.DL.getIndexTypeSizeInBits(PtrOp->getType()));
6976-
return ConstantFoldLoadFromConstPtr(GV, LI->getType(), Offset, Q.DL);
6977+
return ConstantFoldLoadFromConstPtr(GV, LI->getType(), std::move(Offset),
6978+
Q.DL);
69776979
}
69786980

69796981
return nullptr;

llvm/lib/Analysis/TargetTransformInfo.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,15 +364,15 @@ TargetTransformInfo::instCombineIntrinsic(InstCombiner &IC,
364364
}
365365

366366
std::optional<Value *> TargetTransformInfo::simplifyDemandedUseBitsIntrinsic(
367-
InstCombiner &IC, IntrinsicInst &II, APInt DemandedMask, KnownBits &Known,
368-
bool &KnownBitsComputed) const {
367+
InstCombiner &IC, IntrinsicInst &II, const APInt &DemandedMask,
368+
KnownBits &Known, bool &KnownBitsComputed) const {
369369
return TTIImpl->simplifyDemandedUseBitsIntrinsic(IC, II, DemandedMask, Known,
370370
KnownBitsComputed);
371371
}
372372

373373
std::optional<Value *> TargetTransformInfo::simplifyDemandedVectorEltsIntrinsic(
374-
InstCombiner &IC, IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts,
375-
APInt &UndefElts2, APInt &UndefElts3,
374+
InstCombiner &IC, IntrinsicInst &II, const APInt &DemandedElts,
375+
APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3,
376376
std::function<void(Instruction *, unsigned, APInt, APInt &)>
377377
SimplifyAndSetOp) const {
378378
return TTIImpl->simplifyDemandedVectorEltsIntrinsic(

llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7697,7 +7697,7 @@ LegalizerHelper::LegalizeResult LegalizerHelper::lowerBswap(MachineInstr &MI) {
76977697

76987698
//{ (Src & Mask) >> N } | { (Src << N) & Mask }
76997699
static MachineInstrBuilder SwapN(unsigned N, DstOp Dst, MachineIRBuilder &B,
7700-
MachineInstrBuilder Src, APInt Mask) {
7700+
MachineInstrBuilder Src, const APInt &Mask) {
77017701
const LLT Ty = Dst.getLLTTy(*B.getMRI());
77027702
MachineInstrBuilder C_N = B.buildConstant(Ty, N);
77037703
MachineInstrBuilder MaskLoNTo0 = B.buildConstant(Ty, Mask);

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2029,7 +2029,8 @@ SDValue SelectionDAG::getStepVector(const SDLoc &DL, EVT ResVT) {
20292029
return getStepVector(DL, ResVT, One);
20302030
}
20312031

2032-
SDValue SelectionDAG::getStepVector(const SDLoc &DL, EVT ResVT, APInt StepVal) {
2032+
SDValue SelectionDAG::getStepVector(const SDLoc &DL, EVT ResVT,
2033+
const APInt &StepVal) {
20332034
assert(ResVT.getScalarSizeInBits() == StepVal.getBitWidth());
20342035
if (ResVT.isScalableVector())
20352036
return getNode(

llvm/lib/IR/LLVMContextImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ template <> struct MDNodeKeyImpl<DIEnumerator> {
440440
bool IsUnsigned;
441441

442442
MDNodeKeyImpl(APInt Value, bool IsUnsigned, MDString *Name)
443-
: Value(Value), Name(Name), IsUnsigned(IsUnsigned) {}
443+
: Value(std::move(Value)), Name(Name), IsUnsigned(IsUnsigned) {}
444444
MDNodeKeyImpl(int64_t Value, bool IsUnsigned, MDString *Name)
445445
: Value(APInt(64, Value, !IsUnsigned)), Name(Name),
446446
IsUnsigned(IsUnsigned) {}

llvm/lib/MC/MCStreamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void MCStreamer::emitIntValue(uint64_t Value, unsigned Size) {
141141
unsigned Index = IsLittleEndian ? 0 : 8 - Size;
142142
emitBytes(StringRef(reinterpret_cast<char *>(&Swapped) + Index, Size));
143143
}
144-
void MCStreamer::emitIntValue(APInt Value) {
144+
void MCStreamer::emitIntValue(const APInt &Value) {
145145
if (Value.getNumWords() == 1) {
146146
emitIntValue(Value.getLimitedValue(), Value.getBitWidth() / 8);
147147
return;

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2037,7 +2037,7 @@ AArch64TTIImpl::instCombineIntrinsic(InstCombiner &IC,
20372037
}
20382038

20392039
std::optional<Value *> AArch64TTIImpl::simplifyDemandedVectorEltsIntrinsic(
2040-
InstCombiner &IC, IntrinsicInst &II, APInt OrigDemandedElts,
2040+
InstCombiner &IC, IntrinsicInst &II, const APInt &OrigDemandedElts,
20412041
APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3,
20422042
std::function<void(Instruction *, unsigned, APInt, APInt &)>
20432043
SimplifyAndSetOp) const {

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ class AArch64TTIImpl : public BasicTTIImplBase<AArch64TTIImpl> {
125125
IntrinsicInst &II) const;
126126

127127
std::optional<Value *> simplifyDemandedVectorEltsIntrinsic(
128-
InstCombiner &IC, IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts,
129-
APInt &UndefElts2, APInt &UndefElts3,
128+
InstCombiner &IC, IntrinsicInst &II, const APInt &DemandedElts,
129+
APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3,
130130
std::function<void(Instruction *, unsigned, APInt, APInt &)>
131131
SimplifyAndSetOp) const;
132132

llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,8 +1368,8 @@ static Value *simplifyAMDGCNMemoryIntrinsicDemanded(InstCombiner &IC,
13681368
}
13691369

13701370
std::optional<Value *> GCNTTIImpl::simplifyDemandedVectorEltsIntrinsic(
1371-
InstCombiner &IC, IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts,
1372-
APInt &UndefElts2, APInt &UndefElts3,
1371+
InstCombiner &IC, IntrinsicInst &II, const APInt &DemandedElts,
1372+
APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3,
13731373
std::function<void(Instruction *, unsigned, APInt, APInt &)>
13741374
SimplifyAndSetOp) const {
13751375
switch (II.getIntrinsicID()) {

llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ class GCNTTIImpl final : public BasicTTIImplBase<GCNTTIImpl> {
223223
std::optional<Instruction *> instCombineIntrinsic(InstCombiner &IC,
224224
IntrinsicInst &II) const;
225225
std::optional<Value *> simplifyDemandedVectorEltsIntrinsic(
226-
InstCombiner &IC, IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts,
227-
APInt &UndefElts2, APInt &UndefElts3,
226+
InstCombiner &IC, IntrinsicInst &II, const APInt &DemandedElts,
227+
APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3,
228228
std::function<void(Instruction *, unsigned, APInt, APInt &)>
229229
SimplifyAndSetOp) const;
230230

llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ ARMTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
253253
}
254254

255255
std::optional<Value *> ARMTTIImpl::simplifyDemandedVectorEltsIntrinsic(
256-
InstCombiner &IC, IntrinsicInst &II, APInt OrigDemandedElts,
256+
InstCombiner &IC, IntrinsicInst &II, const APInt &OrigDemandedElts,
257257
APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3,
258258
std::function<void(Instruction *, unsigned, APInt, APInt &)>
259259
SimplifyAndSetOp) const {

llvm/lib/Target/ARM/ARMTargetTransformInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ class ARMTTIImpl : public BasicTTIImplBase<ARMTTIImpl> {
122122
std::optional<Instruction *> instCombineIntrinsic(InstCombiner &IC,
123123
IntrinsicInst &II) const;
124124
std::optional<Value *> simplifyDemandedVectorEltsIntrinsic(
125-
InstCombiner &IC, IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts,
126-
APInt &UndefElts2, APInt &UndefElts3,
125+
InstCombiner &IC, IntrinsicInst &II, const APInt &DemandedElts,
126+
APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3,
127127
std::function<void(Instruction *, unsigned, APInt, APInt &)>
128128
SimplifyAndSetOp) const;
129129

0 commit comments

Comments
 (0)