@@ -210,8 +210,8 @@ struct SpecificConstantMatch {
210210};
211211
212212// / Matches a constant equal to \p RequestedValue.
213- inline SpecificConstantMatch m_SpecificICst (APInt RequestedValue) {
214- return SpecificConstantMatch (std::move ( RequestedValue) );
213+ inline SpecificConstantMatch m_SpecificICst (const APInt & RequestedValue) {
214+ return SpecificConstantMatch (RequestedValue);
215215}
216216
217217inline SpecificConstantMatch m_SpecificICst (int64_t RequestedValue) {
@@ -221,7 +221,7 @@ inline SpecificConstantMatch m_SpecificICst(int64_t RequestedValue) {
221221// / Matcher for a specific constant splat.
222222struct SpecificConstantSplatMatch {
223223 APInt RequestedVal;
224- SpecificConstantSplatMatch (const APInt RequestedVal)
224+ SpecificConstantSplatMatch (const APInt & RequestedVal)
225225 : RequestedVal(RequestedVal) {}
226226 bool match (const MachineRegisterInfo &MRI, Register Reg) {
227227 return isBuildVectorConstantSplat (Reg, MRI, RequestedVal,
@@ -230,8 +230,9 @@ struct SpecificConstantSplatMatch {
230230};
231231
232232// / Matches a constant splat of \p RequestedValue.
233- inline SpecificConstantSplatMatch m_SpecificICstSplat (APInt RequestedValue) {
234- return SpecificConstantSplatMatch (std::move (RequestedValue));
233+ inline SpecificConstantSplatMatch
234+ m_SpecificICstSplat (const APInt &RequestedValue) {
235+ return SpecificConstantSplatMatch (RequestedValue);
235236}
236237
237238inline SpecificConstantSplatMatch m_SpecificICstSplat (int64_t RequestedValue) {
@@ -242,7 +243,7 @@ inline SpecificConstantSplatMatch m_SpecificICstSplat(int64_t RequestedValue) {
242243// / Matcher for a specific constant or constant splat.
243244struct SpecificConstantOrSplatMatch {
244245 APInt RequestedVal;
245- SpecificConstantOrSplatMatch (const APInt RequestedVal)
246+ SpecificConstantOrSplatMatch (const APInt & RequestedVal)
246247 : RequestedVal(RequestedVal) {}
247248 bool match (const MachineRegisterInfo &MRI, Register Reg) {
248249 APInt MatchedVal;
@@ -263,8 +264,8 @@ struct SpecificConstantOrSplatMatch {
263264// / Matches a \p RequestedValue constant or a constant splat of \p
264265// / RequestedValue.
265266inline SpecificConstantOrSplatMatch
266- m_SpecificICstOrSplat (APInt RequestedValue) {
267- return SpecificConstantOrSplatMatch (std::move ( RequestedValue) );
267+ m_SpecificICstOrSplat (const APInt & RequestedValue) {
268+ return SpecificConstantOrSplatMatch (RequestedValue);
268269}
269270
270271inline SpecificConstantOrSplatMatch
0 commit comments