Fix left shift overflow UB in PPC backend on LLP64 platforms

This commit is contained in:
Reid Kleckner 2020-12-19 17:45:49 -08:00
parent 7c6f28a438
commit 0985a8bfea
1 changed files with 1 additions and 1 deletions

View File

@ -9189,7 +9189,7 @@ static SDValue getCanonicalConstSplat(uint64_t Val, unsigned SplatSize, EVT VT,
EVT ReqVT = VT != MVT::Other ? VT : VTys[SplatSize-1];
// For a splat with all ones, turn it to vspltisb 0xFF to canonicalize.
if (Val == ((1LU << (SplatSize * 8)) - 1)) {
if (Val == ((1LLU << (SplatSize * 8)) - 1)) {
SplatSize = 1;
Val = 0xFF;
}