From: Junyan He <[email protected]> The fake dst regigster which is used to avoid the thread switch for CMP instruction is not correct for I64 comparing. The dst must have the same vstride as the src, so we need to allocate a fake long type register.
Signed-off-by: Junyan He <[email protected]> --- backend/src/backend/gen_reg_allocation.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/backend/gen_reg_allocation.cpp b/backend/src/backend/gen_reg_allocation.cpp index 26078e0..71bb8c1 100644 --- a/backend/src/backend/gen_reg_allocation.cpp +++ b/backend/src/backend/gen_reg_allocation.cpp @@ -620,7 +620,10 @@ namespace gbe // set a temporary register to avoid switch in this block. bool isSrc = false; bool needMov = false; - this->replaceReg(selection, &insn, 0, isSrc, ir::TYPE_FLOAT, needMov); + ir::Type ir_type = ir::TYPE_FLOAT; + if (insn.src(0).isint64()) + ir_type = ir::TYPE_U64; + this->replaceReg(selection, &insn, 0, isSrc, ir_type, needMov); } // If the instruction requires to generate (CMP for long/int/float..) // the flag value to the register, and it's not a pure flag boolean, -- 1.9.1 _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
