Disable signed magic division in minopts mode
authorMike Danes <onemihaid@hotmail.com>
Wed, 31 May 2017 17:33:08 +0000 (20:33 +0300)
committerMike Danes <onemihaid@hotmail.com>
Wed, 7 Jun 2017 16:29:49 +0000 (19:29 +0300)
Commit migrated from https://github.com/dotnet/coreclr/commit/1a5d5e59bba2417ba6c744dca8cb2fcb146a0539

src/coreclr/src/jit/lower.cpp

index 585c44f..109f69b 100644 (file)
@@ -4244,6 +4244,11 @@ GenTree* Lowering::LowerSignedDivOrMod(GenTreePtr node)
 
     if (!isPow2(absDivisorValue))
     {
+        if (comp->opts.MinOpts())
+        {
+            return next;
+        }
+
 #ifdef _TARGET_XARCH_
         ssize_t magic;
         int     shift;