[Beignet] [PATCH] Fix bug for scalar long conversion.
junyan.he at inbox.com
junyan.he at inbox.com
Sun Jan 25 21:53:45 PST 2015
From: Junyan He <junyan.he at linux.intel.com>
The following instruction:
mov (1) r127.7<1>:f r8.2<0;1,0>:q
can not work because the dst should have same alignment
with the source, which will cause the conversion error.
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
backend/src/backend/gen_insn_selection.cpp | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/backend/src/backend/gen_insn_selection.cpp b/backend/src/backend/gen_insn_selection.cpp
index 628fa2f..bdf7c55 100644
--- a/backend/src/backend/gen_insn_selection.cpp
+++ b/backend/src/backend/gen_insn_selection.cpp
@@ -3998,12 +3998,8 @@ namespace gbe
} else {
GenRegister unpacked;
const uint32_t type = GEN_TYPE_F;
- if (!sel.isScalarReg(dst.reg())) {
- unpacked = sel.unpacked_ud(sel.reg(FAMILY_QWORD, sel.isScalarReg(insn.getSrc(0))));
- unpacked = GenRegister::retype(unpacked, type);
- } else {
- unpacked = GenRegister::retype(sel.unpacked_ud(dst.reg()), type);
- }
+ unpacked = sel.unpacked_ud(sel.reg(FAMILY_QWORD, sel.isScalarReg(insn.getSrc(0))));
+ unpacked = GenRegister::retype(unpacked, type);
sel.push();
if (sel.isScalarReg(insn.getSrc(0))) {
--
1.9.1
More information about the Beignet
mailing list