[Beignet] [PATCH 2/3] fix a potential issue of SEL IR optimization when subphysical is true
Guo Yejun
yejun.guo at intel.com
Thu Feb 4 23:25:19 UTC 2016
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.guo at 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
More information about the Beignet
mailing list