Special-case $x**3
commitf5abe3d780c70eccc20bd2c41b0670b750079ff7
authorMadelaine Boyd <madelaine@fb.com>
Wed, 26 Oct 2016 13:01:51 +0000 (26 06:01 -0700)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Wed, 26 Oct 2016 13:06:15 +0000 (26 06:06 -0700)
tree8ab4e6ce909445facdf427989ea4076e372365da
parentb73bd4539f4efa28d710c5bf87193145362fdaa5
Special-case $x**3

Summary:
Problem - I pop a Pow and push two MulIntOs. Diff as it stands causes a stack corruption in the updated unit test.
What is the proper way to exit from here?
Realizing now that I need to handle the possibility of (LARGE_INT**3),
where (LARGE_INT*LARGE_INT)*LARGE_INT--> the first multiplication can overflow to double. I would need to check in the second multiplication pass
whether this calls for MulIntO or MulDbl.

Reviewed By: ricklavoie

Differential Revision: D4063317

fbshipit-source-id: c6b5edbb598f9c4b3fcb52f4baaaf2e903e63eec
hphp/runtime/vm/jit/irgen-arith.cpp
hphp/test/slow/arithmetic/power-multiply-equivalence.php
hphp/test/slow/arithmetic/power-multiply-equivalence.php.expect