[Beignet] [PATCH 1/7] GBE: Fix type mismatch bug.
Ruiling Song
ruiling.song at intel.com
Fri Apr 1 06:53:22 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 06d6760..a746d80 100644
--- a/backend/src/llvm/llvm_gen_backend.cpp
+++ b/backend/src/llvm/llvm_gen_backend.cpp
@@ -4309,7 +4309,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