Fix folding insert feeding extract
authorSteven Perron <stevenperron@google.com>
Mon, 19 Feb 2018 01:58:05 +0000 (20:58 -0500)
committerSteven Perron <31666470+s-perron@users.noreply.github.com>
Tue, 20 Feb 2018 16:22:51 +0000 (11:22 -0500)
commit9d95a91a9f3199e190c57a2e279b56dbddfc6518
tree440d6ff26259758991914416491b1038082954c9
parentc3f34d8bf3532040592a8bbb7f8079bcb7ae4c6b
Fix folding insert feeding extract

I mixed up two cases when folding an OpCompositeExtract that is feed by
and OpCompositeInsert.  The specific cases are demonstracted in the new
test.  I mixed up the conditions for the cases, and treated one like the
other.

Fixes #1323.
source/opt/folding_rules.cpp
test/opt/fold_test.cpp