Fixes #1385. Grab correct input to calculate indices.
authorAlan Baker <alanbaker@google.com>
Wed, 7 Mar 2018 17:58:10 +0000 (12:58 -0500)
committerAlan Baker <alanbaker@google.com>
Wed, 7 Mar 2018 21:07:40 +0000 (16:07 -0500)
commitbc9cfee6faa67fe570312aa889596b96165a9e7f
treec8e9343b839c310d0284c7f7ec1ddf61267c7eb7
parent03b8a3fe540e72794646195fe261a679203c13ac
Fixes #1385. Grab correct input to calculate indices.

* Added tests to catch the bug
source/opt/folding_rules.cpp
test/opt/fold_test.cpp