mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +00:00
X86: silence sign comparison warning
GCC 4.8 detected a signed compare [-Wsign-compare]. Add a cast for the destination index. Add an assert to catch a potential overflow however unlikely it may be. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213878 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cb1ac70623
commit
9a050915f9
@ -9069,7 +9069,9 @@ static SDValue getINSERTPS(ShuffleVectorSDNode *SVOp, SDLoc &dl,
|
|||||||
// should assume we're changing V2's element's place and behave
|
// should assume we're changing V2's element's place and behave
|
||||||
// accordingly.
|
// accordingly.
|
||||||
int FromV2 = std::count_if(Mask.begin(), Mask.end(), FromV2Predicate);
|
int FromV2 = std::count_if(Mask.begin(), Mask.end(), FromV2Predicate);
|
||||||
if (FromV1 == FromV2 && DestIndex == Mask[DestIndex] % 4) {
|
assert(DestIndex <= INT32_MAX && "truncated destination index");
|
||||||
|
if (FromV1 == FromV2 &&
|
||||||
|
static_cast<int>(DestIndex) == Mask[DestIndex] % 4) {
|
||||||
From = V2;
|
From = V2;
|
||||||
To = V1;
|
To = V1;
|
||||||
DestIndex =
|
DestIndex =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user