Skip to content

Commit 3b74d54

Browse files
[Target] Use llvm::rotl (NFC) (#164144)
1 parent 622605e commit 3b74d54

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/Target/AArch64/AArch64ExpandImm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ void AArch64_IMM::expandMOVImm(uint64_t Imm, unsigned BitSize,
585585
uint64_t ShiftedMask = (0xFFFFULL << Shift);
586586
uint64_t ZeroChunk = UImm & ~ShiftedMask;
587587
uint64_t OneChunk = UImm | ShiftedMask;
588-
uint64_t RotatedImm = (UImm << 32) | (UImm >> 32);
588+
uint64_t RotatedImm = llvm::rotl(UImm, 32);
589589
uint64_t ReplicateChunk = ZeroChunk | (RotatedImm & ShiftedMask);
590590
if (AArch64_AM::processLogicalImmediate(ZeroChunk, BitSize, Encoding) ||
591591
AArch64_AM::processLogicalImmediate(OneChunk, BitSize, Encoding) ||

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41846,7 +41846,7 @@ static SDValue combineCommutableSHUFP(SDValue N, MVT VT, const SDLoc &DL,
4184641846
if (!X86::mayFoldLoad(peekThroughOneUseBitcasts(N0), Subtarget) ||
4184741847
X86::mayFoldLoad(peekThroughOneUseBitcasts(N1), Subtarget))
4184841848
return SDValue();
41849-
Imm = ((Imm & 0x0F) << 4) | ((Imm & 0xF0) >> 4);
41849+
Imm = llvm::rotl<uint8_t>(Imm, 4);
4185041850
return DAG.getNode(X86ISD::SHUFP, DL, VT, N1, N0,
4185141851
DAG.getTargetConstant(Imm, DL, MVT::i8));
4185241852
};

0 commit comments

Comments
 (0)