Once the byte scattered read with more than one byte is enabled,
there will same ir reg with different subnr, it makes the current
logic in SELECTION IR optmization (local copy propogation) incorrect,
so fix the issue by scanning all the map.

Signed-off-by: Guo Yejun <yejun....@intel.com>
---
 backend/src/backend/gen_insn_selection_optimize.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/backend/src/backend/gen_insn_selection_optimize.cpp 
b/backend/src/backend/gen_insn_selection_optimize.cpp
index 6be2468..c445bf5 100644
--- a/backend/src/backend/gen_insn_selection_optimize.cpp
+++ b/backend/src/backend/gen_insn_selection_optimize.cpp
@@ -141,8 +141,9 @@ namespace gbe
         return;
       }
       if (info->replacement.reg() == var.reg()) {  //replacement is overwritten
+        //there could be more than one replacements (with different physical 
subnr) overwritten,
+        //so do not break here, need to scann the whole map
         info->replacementOverwritten = true;
-        return;
       }
     }
   }
-- 
1.9.1

_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to