commit | 5ff1de5384c5749d88a7f39054bad3ad1a1f5ac2 | [log] [tgz] |
---|---|---|
author | Antonio Maiorano <amaiorano@google.com> | Tue Mar 03 19:53:13 2020 -0500 |
committer | Antonio Maiorano <amaiorano@google.com> | Wed Mar 04 15:34:00 2020 +0000 |
tree | 81e80c6c1bacf1bd2d8a2c2bf8678c86cabcdf5d | |
parent | 126720bd2e578fec077a57d877ac64c46b18cd52 [diff] |
Subzero: fix regression in Optimizer Regression was introduced in https://swiftshader-review.googlesource.com/c/SwiftShader/+/41269 When detecting and removing intermediate stores, if the storeValue is a constant, we skip it; however, we must make sure to set unmatchedLoads to true, or the optimizer will incorrectly eliminate the skipped store on a later iteration. This bug lead to incorrect generated code, which failed certain deqp-vk tests, e.g. dEQP-VK.clipping.user_defined.clip_cull_distance.vert.2_6 Bug: b/148272103 Change-Id: I024d75decdc4f1d13e7f82cade50f8be09d68f3e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/41888 Tested-by: Antonio Maiorano <amaiorano@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Reactor/Optimizer.cpp b/src/Reactor/Optimizer.cpp index 184ac75..5e73519 100644 --- a/src/Reactor/Optimizer.cpp +++ b/src/Reactor/Optimizer.cpp
@@ -428,6 +428,7 @@ // on this load. if(llvm::isa<Ice::Constant>(storeValue)) { + unmatchedLoads = true; continue; }