Skip to content

Commit

Permalink
Fix Vector256.Create(0,0,0..,C,C,C..) lowered to Vector256.Zero always
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorBo committed Jan 20, 2021
1 parent c4421ac commit 1809af6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coreclr/jit/lowerxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,7 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node)
assert((simdSize == 8) || (simdSize == 12) || (simdSize == 16) || (simdSize == 32));

if ((argCnt == 1) ||
((vecCns.i64[0] == vecCns.i64[1]) && ((simdSize <= 16) || (vecCns.i64[2] == vecCns.i64[3]))))
((vecCns.i64[0] == vecCns.i64[1]) && ((simdSize <= 16) || ((vecCns.i64[0] == vecCns.i64[2]) && (vecCns.i64[2] == vecCns.i64[3])))))
{
// If we are a single constant or if all parts are the same, we might be able to optimize
// this even further for certain values, such as Zero or AllBitsSet.
Expand Down

0 comments on commit 1809af6

Please sign in to comment.