summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Xionghu <xionghu.luo@intel.com>2014-12-02 15:58:55 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-12-02 17:06:57 +0800
commitb85904ed0bce071307568a01a2aff76dd232d220 (patch)
tree496b5b4456d22503508a16545c7b13311ae12102
parent5e70dd0d9f6f4d0659ba9403e27f2403669327a2 (diff)
fix dnetc overflow issue.
the overflow type should be unsigned for uadd_with_overflow. this patch fixed the "dnetc -test rc5-72 0" 15 fails out of 32 when disabled bswap. Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@intel.com>
-rw-r--r--backend/src/llvm/llvm_gen_backend.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
index 3d74a0aa..7f926583 100644
--- a/backend/src/llvm/llvm_gen_backend.cpp
+++ b/backend/src/llvm/llvm_gen_backend.cpp
@@ -2980,7 +2980,8 @@ namespace gbe
ctx.ADD(dst0Type, dst0, src0, src1);
ir::Register overflow = this->getRegister(&I, 1);
- ctx.LT(dst0Type, overflow, dst0, src1);
+ const ir::Type unsignedType = makeTypeUnsigned(dst0Type);
+ ctx.LT(unsignedType, overflow, dst0, src1);
}
break;
case Intrinsic::usub_with_overflow: