diff --git a/llvm/include/llvm/Analysis/AliasSetTracker.h b/llvm/include/llvm/Analysis/AliasSetTracker.h index 3030cb30864ae7..b8e8e7ef047f96 100644 --- a/llvm/include/llvm/Analysis/AliasSetTracker.h +++ b/llvm/include/llvm/Analysis/AliasSetTracker.h @@ -120,7 +120,7 @@ class AliasSet : public ilist_node { iterator begin() const { return MemoryLocs.begin(); } iterator end() const { return MemoryLocs.end(); } - unsigned size() { return MemoryLocs.size(); } + unsigned size() const { return MemoryLocs.size(); } /// Retrieve the pointer values for the memory locations in this alias set. /// The order matches that of the memory locations, but duplicate pointer diff --git a/llvm/include/llvm/Analysis/VectorUtils.h b/llvm/include/llvm/Analysis/VectorUtils.h index 521dac08792f57..7a740d1206f7c3 100644 --- a/llvm/include/llvm/Analysis/VectorUtils.h +++ b/llvm/include/llvm/Analysis/VectorUtils.h @@ -96,6 +96,7 @@ class VFDatabase { VFDatabase(CallInst &CI) : M(CI.getModule()), CI(CI), ScalarToVectorMappings(VFDatabase::getMappings(CI)) {} + /// \defgroup VFDatabase query interface. /// /// @{ diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp index a766b1fe601823..4622ad7e9a0e7d 100644 --- a/llvm/lib/IR/ConstantFold.cpp +++ b/llvm/lib/IR/ConstantFold.cpp @@ -542,6 +542,7 @@ Constant *llvm::ConstantFoldShuffleVectorInstruction(Constant *V1, Constant *V2, } else if (!MaskEltCount.isScalable()) return ConstantVector::getSplat(MaskEltCount, Elt); } + // Do not iterate on scalable vector. The num of elements is unknown at // compile-time. if (isa(V1VTy)) diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp index 55fecc4b4845fd..aa0b7c93f86617 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -5717,7 +5717,7 @@ int llvm::isAArch64FrameOffsetLegal(const MachineInstr &MI, Offset = Remainder; else { NewOffset = NewOffset < 0 ? MinOff : MaxOff; - Offset = Offset - NewOffset * Scale; + Offset = Offset - (NewOffset * Scale); } if (EmittableOffset)