1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

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 ff58b9b50b
commit bf5fdca4c8

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;
}