LGTM, thanks.

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of [email protected]
Sent: Wednesday, January 22, 2014 2:03 PM
To: [email protected]
Cc: Junyan He
Subject: [Beignet] [PATCH] Fix the bug in removeLOADIs function.

From: Junyan He <[email protected]>

The logic for replacing the dst of the instruction using the src number and 
getSrc. Fix this problem.

Signed-off-by: Junyan He <[email protected]>
---
 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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to