diff options
author | Clinton Ingram <clinton.ingram@outlook.com> | 2019-02-23 09:06:16 -0800 |
---|---|---|
committer | Andy Ayers <andya@microsoft.com> | 2019-02-23 09:06:16 -0800 |
commit | 56da27b66c9463f0a28b2427aabbe2af0614efdc (patch) | |
tree | 2c8209206280337bc78bc65f9dc791564ee95a4c /src/jit/importer.cpp | |
parent | 2c61b985c0513d9a70eee7221fa15910e7003d16 (diff) | |
download | coreclr-56da27b66c9463f0a28b2427aabbe2af0614efdc.tar.gz coreclr-56da27b66c9463f0a28b2427aabbe2af0614efdc.tar.bz2 coreclr-56da27b66c9463f0a28b2427aabbe2af0614efdc.zip |
fix BSWAP16 intrinsic handling of signed values (#22666)
Diffstat (limited to 'src/jit/importer.cpp')
-rw-r--r-- | src/jit/importer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index 5d3a82e4af..6f19213c65 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -4068,7 +4068,8 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, { case CorInfoType::CORINFO_TYPE_SHORT: case CorInfoType::CORINFO_TYPE_USHORT: - retNode = gtNewOperNode(GT_BSWAP16, callType, impPopStack().val); + retNode = gtNewCastNode(TYP_INT, gtNewOperNode(GT_BSWAP16, TYP_INT, impPopStack().val), false, + callType); break; case CorInfoType::CORINFO_TYPE_INT: |