modify conditional statement and align for formatting
authorHyeongseok Oh <hseok82.oh@smasung.com>
Tue, 30 Aug 2016 02:12:10 +0000 (11:12 +0900)
committerHyeongseok Oh <hseok82.oh@smasung.com>
Tue, 30 Aug 2016 02:12:10 +0000 (11:12 +0900)
Commit migrated from https://github.com/dotnet/coreclr/commit/88d73f77e6de3e48674c2d2ce18bb8955e102abd

src/coreclr/src/jit/gentree.cpp

index 4c04fd2..39245ba 100644 (file)
@@ -12047,9 +12047,8 @@ GenTreePtr Compiler::gtFoldExprConst(GenTreePtr tree)
                             return tree;
                         }
 
-                        if (d1 < 0.0) {
-                            if (tree->CastToType() == TYP_CHAR || tree->CastToType() == TYP_UBYTE ||
-                                tree->CastToType() == TYP_UINT || tree->CastToType() == TYP_ULONG)
+                        if (d1 <= -1.0 && varTypeIsUnsigned(tree->CastToType())) 
+                        {
                             return tree;
                         }