GBE: fix one regression caused by uniform analysis.
authorZhigang Gong <zhigang.gong@intel.com>
Tue, 13 May 2014 10:29:18 +0000 (18:29 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Wed, 14 May 2014 02:37:08 +0000 (10:37 +0800)
Some instructions handle simd1 incorrectly. Disable them
currently.

v2:
add addsat into the unsupported list.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
backend/src/ir/liveness.cpp

index 3469a20..c3d6fe4 100644 (file)
@@ -76,10 +76,16 @@ namespace ir {
     // A destination is a killed value
     for (uint32_t dstID = 0; dstID < dstNum; ++dstID) {
       const Register reg = insn.getDst(dstID);
+      int opCode = insn.getOpcode();
+      // FIXME, ADDSAT and uniform vector should be supported.
       if (uniform &&
           fn.getRegisterFamily(reg) != ir::FAMILY_QWORD &&
           !info.bb.definedPhiRegs.contains(reg) &&
-          insn.getOpcode() != ir::OP_ATOMIC &&
+          opCode != ir::OP_ATOMIC &&
+          opCode != ir::OP_MUL_HI &&
+          opCode != ir::OP_HADD &&
+          opCode != ir::OP_RHADD &&
+          opCode != ir::OP_ADDSAT &&
           (dstNum == 1 || insn.getOpcode() != ir::OP_LOAD)
          )
         fn.setRegisterUniform(reg, true);