OSDN Git Service

Fix loading uninitialized data in loops.
authorNicolas Capens <capn@google.com>
Wed, 18 Jan 2017 15:18:03 +0000 (10:18 -0500)
committerNicolas Capens <capn@google.com>
Wed, 18 Jan 2017 16:28:38 +0000 (16:28 +0000)
commit22e18bcc94c6b1220b8ea2d54bbec18539f6f33f
treec8e97afadafb47ed9df7056d54221e0102b630f7
parent3e7062b993c74700a403f46f01e0d55bfaed71df
Fix loading uninitialized data in loops.

When we have an uninitialized variable that is declared outside of a
loop and is read and written to inside the loop, we should not eliminate
the load and replace it with an undefined value, because in the next
iteration we want the value from the previous iteration.

Change-Id: Ic996c796307f62fc835079af6c58adf1eb288259
Reviewed-on: https://swiftshader-review.googlesource.com/8488
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/Reactor/Optimizer.cpp