1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[PPC] Fix UBSAN warning about out of range shift. NFCI.

This commit is contained in:
Simon Pilgrim 2021-03-12 12:03:36 +00:00
parent e5295af6ae
commit 6caa86e179

View File

@ -1043,7 +1043,7 @@ static SDNode *selectI64ImmDirectPrefix(SelectionDAG *CurDAG, const SDLoc &dl,
unsigned TZ = countTrailingZeros<uint64_t>(Imm);
unsigned LZ = countLeadingZeros<uint64_t>(Imm);
unsigned TO = countTrailingOnes<uint64_t>(Imm);
unsigned FO = countLeadingOnes<uint64_t>(Imm << LZ);
unsigned FO = countLeadingOnes<uint64_t>(LZ == 64 ? 0 : (Imm << LZ));
unsigned Hi32 = Hi_32(Imm);
unsigned Lo32 = Lo_32(Imm);