[Beignet] [PATCH] Fix the bug in removeLOADIs function.
Yang, Rong R
rong.r.yang at intel.com
Wed Jan 22 19:59:17 PST 2014
LGTM, thanks.
-----Original Message-----
From: beignet-bounces at lists.freedesktop.org [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of junyan.he at inbox.com
Sent: Wednesday, January 22, 2014 2:03 PM
To: beignet at lists.freedesktop.org
Cc: Junyan He
Subject: [Beignet] [PATCH] Fix the bug in removeLOADIs function.
From: Junyan He <junyan.he at linux.intel.com>
The logic for replacing the dst of the instruction using the src number and getSrc. Fix this problem.
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
backend/src/llvm/llvm_gen_backend.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
index c468b02..4bfd8af 100644
--- a/backend/src/llvm/llvm_gen_backend.cpp
+++ b/backend/src/llvm/llvm_gen_backend.cpp
@@ -1355,7 +1355,7 @@ namespace gbe
// substitutions (if any)
else {
const uint32_t srcNum = insn.getSrcNum();
- const uint32_t dstNum = insn.getSrcNum();
+ const uint32_t dstNum = insn.getDstNum();
for (uint32_t srcID = 0; srcID < srcNum; ++srcID) {
const ir::Register src = insn.getSrc(srcID);
auto it = immTranslate.find(src); @@ -1363,7 +1363,7 @@ namespace gbe
insn.setSrc(srcID, it->second);
}
for (uint32_t dstID = 0; dstID < dstNum; ++dstID) {
- const ir::Register dst = insn.getSrc(dstID);
+ const ir::Register dst = insn.getDst(dstID);
auto it = immTranslate.find(dst);
if (it != immTranslate.end())
insn.setDst(dstID, it->second);
--
1.7.9.5
_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list