[Beignet] [PATCH 1/3] GBE: Fix type mismatch bug.

Ruiling Song ruiling.song at intel.com
Fri Mar 4 08:33:39 UTC 2016


the move instruction should have same type src & dst.

Signed-off-by: Ruiling Song <ruiling.song at intel.com>
---
 backend/src/llvm/llvm_gen_backend.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
index 6646536..32f8fe3 100644
--- a/backend/src/llvm/llvm_gen_backend.cpp
+++ b/backend/src/llvm/llvm_gen_backend.cpp
@@ -4156,7 +4156,8 @@ namespace gbe
             const ir::Register dst = this->getRegister(&I);
             uint32_t stackSize = ctx.getFunction().getStackSize();
             if (stackSize == 0) {
-              ctx.MOV(ir::TYPE_BOOL, dst, ir::ocl::zero);
+              ir::ImmediateIndex imm = ctx.newImmediate((bool)0);
+              ctx.LOADI(ir::TYPE_BOOL, dst, imm);
             } else {
               ir::Register cmp0 = ctx.reg(ir::FAMILY_BOOL);
               ir::Register cmp1 = ctx.reg(ir::FAMILY_BOOL);
-- 
2.4.1



More information about the Beignet mailing list