[Beignet] [PATCH] Fix a indirect argument load bug.
Yang Rong
rong.r.yang at intel.com
Wed May 20 20:31:21 PDT 2015
If use arg as non add instruction's source directly, for example phi and selection, there is no add, just skip it.
Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
backend/src/ir/lowering.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/backend/src/ir/lowering.cpp b/backend/src/ir/lowering.cpp
index e17248a..9fcdf74 100644
--- a/backend/src/ir/lowering.cpp
+++ b/backend/src/ir/lowering.cpp
@@ -330,6 +330,7 @@ namespace ir {
indirectSeq.push_back(indirectLoad);
} else {
+ if(it == addPtrInsns.end()) continue; //use arg as phi or selection, no add, skip it.
auto dstIt = addPtrInsns.find(dst);
if(dstIt == addPtrInsns.end())
addPtrInsns.insert(std::make_pair(dst, it->second));
--
1.8.3.2
More information about the Beignet
mailing list