diff options
author | Steve MacLean <sdmaclea.qdt@qualcommdatacenter.com> | 2017-11-01 12:22:49 -0400 |
---|---|---|
committer | Steve MacLean <sdmaclea.qdt@qualcommdatacenter.com> | 2017-11-01 12:32:54 -0400 |
commit | 6fffd5d49d3224d2692e8bfe85630e61480d37c5 (patch) | |
tree | 03a58bb6ee68e2d5a693c326a9def480710a11e4 /src | |
parent | fe8ce77cf9d0efc70a7774b0296907865c3b3abd (diff) | |
download | coreclr-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.cpp | 2 |
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. |