[jit] Constant folding for some Math operations on doubles (#9281)
commit917d219d54dbf9b75ae3ef313a532cb7c94f5bb6
authorMiguel de Icaza <miguel@gnome.org>
Sat, 19 Jan 2019 09:45:39 +0000 (19 04:45 -0500)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Sat, 19 Jan 2019 09:45:39 +0000 (19 04:45 -0500)
treee7f0eaf1192847f6a6f495c2a024fd1e9543bdf6
parent1a965367e5053028f9421c75a61c068587405a06
[jit] Constant folding for some Math operations on doubles (#9281)

[jit] Constant folding for some Math operations on doubles

This adds support for constant folding of additions and
multiplications of doubles as well as constant folding of Math.Sin,
Math.Cos, Math.Abs and Math.Sqrt.

Inspired by some changes that went into RyuJit:

https://github.com/AndreyAkinshin/aakinshin.net/blob/master/web/_posts/en/2015/ryujit-rc-and-constant-folding.md
mcs/class/corlib/Test/System/MathTest.cs
mono/mini/cfold.c
mono/mini/intrinsics.c
mono/mini/mini-ops.h