BDW: Fix bwd 32*32 scalar multiplication bug.
authorYang Rong <rong.r.yang@intel.com>
Wed, 29 Oct 2014 07:37:38 +0000 (15:37 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Wed, 29 Oct 2014 08:12:23 +0000 (16:12 +0800)
When scalar multiplication, must disable predicate and don't need specail handle.

Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Tested-by: Zhu, BingbingX <bingbingx.zhu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
backend/src/backend/gen_insn_selection.cpp

index 605fdd5..64e9fd8 100644 (file)
@@ -2566,14 +2566,12 @@ namespace gbe
 
       sel.push();
       if (sel.has32X32Mul()) {
-        //Seems scalar mul need QWROD dst, otherwise will touch the dst's follow register.
         if (sel.isScalarReg(insn.getDst(0)) == true) {
           sel.curr.execWidth = 1;
-          GenRegister tmp = sel.selReg(sel.reg(FAMILY_QWORD), Type::TYPE_S64);
-          sel.MUL(tmp, src0, src1);
-          sel.MOV(dst, GenRegister::retype(tmp, GEN_TYPE_D));
-        } else
-          sel.MUL(dst, src0, src1);
+          sel.curr.predicate = GEN_PREDICATE_NONE;
+          sel.curr.noMask = 1;
+        }
+        sel.MUL(dst, src0, src1);
       } else {
         if (sel.isScalarReg(insn.getDst(0)) == true) {
           sel.curr.execWidth = 1;