[Beignet] [Patch V2 2/2] GBE: fix a mix analyze bug.
Yang Rong
rong.r.yang at intel.com
Mon Jan 9 06:50:47 UTC 2017
When update pointerOrigMap, only non-select and non-phi insn need
update second[0], if update select or phi's second[0], will over
write the info.
Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
backend/src/llvm/llvm_gen_backend.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
index 467b1de..1e7b140 100644
--- a/backend/src/llvm/llvm_gen_backend.cpp
+++ b/backend/src/llvm/llvm_gen_backend.cpp
@@ -929,7 +929,8 @@ namespace gbe
pointerOrigMap.insert(std::make_pair(work, pointers));
} else {
// update the pointer source here,
- (*ptrIter).second[0] = ptr;
+ if ((!isa<SelectInst>(work) && !isa<PHINode>(work)))
+ (*ptrIter).second[0] = ptr;
}
continue;
@@ -975,7 +976,8 @@ namespace gbe
pointerOrigMap.insert(std::make_pair(pointer, pointers));
} else {
// update the pointer source here,
- (*ptrIter).second[0] = ptr;
+ if ((!isa<SelectInst>(pointer) && !isa<PHINode>(pointer)))
+ (*ptrIter).second[0] = ptr;
}
} else {
workList.push_back(theUser);
--
2.1.4
More information about the Beignet
mailing list