summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteve MacLean <sdmaclea.qdt@qualcommdatacenter.com>2017-11-01 12:22:49 -0400
committerSteve MacLean <sdmaclea.qdt@qualcommdatacenter.com>2017-11-01 12:32:54 -0400
commit6fffd5d49d3224d2692e8bfe85630e61480d37c5 (patch)
tree03a58bb6ee68e2d5a693c326a9def480710a11e4 /src
parentfe8ce77cf9d0efc70a7774b0296907865c3b3abd (diff)
downloadcoreclr-6fffd5d49d3224d2692e8bfe85630e61480d37c5.tar.gz
coreclr-6fffd5d49d3224d2692e8bfe85630e61480d37c5.tar.bz2
coreclr-6fffd5d49d3224d2692e8bfe85630e61480d37c5.zip
SIMD Handle negative indicies in get_Item
Diffstat (limited to 'src')
-rw-r--r--src/jit/simd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jit/simd.cpp b/src/jit/simd.cpp
index bb33fcd636..def834b76a 100644
--- a/src/jit/simd.cpp
+++ b/src/jit/simd.cpp
@@ -2533,7 +2533,7 @@ GenTreePtr Compiler::impSIMDIntrinsic(OPCODE opcode,
op2 = impSIMDPopStack(TYP_INT);
op1 = impSIMDPopStack(simdType, instMethod);
int vectorLength = getSIMDVectorLength(size, baseType);
- if (!op2->IsCnsIntOrI() || op2->AsIntCon()->gtIconVal >= vectorLength)
+ if (!op2->IsCnsIntOrI() || op2->AsIntCon()->gtIconVal >= vectorLength || op2->AsIntCon()->gtIconVal < 0)
{
// We need to bounds-check the length of the vector.
// For that purpose, we need to clone the index expression.