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:
parent
ff58b9b50b
commit
bf5fdca4c8
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user