aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4regalloc.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@me.com>2013-10-18 17:02:57 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-04 16:42:46 +0100
commit7e3578728edec27301b71f5ab5d7b43874ae35a2 (patch)
tree25b66bfd38acd67a2ad032699edf9d00864c50c3 /src/qml/compiler/qv4regalloc.cpp
parent102f57376f5d1ace2e9a3e0ffa829a1bbc0d002c (diff)
V4 IR: reverse propagate int32 truncation.
Change-Id: I5cb0c7798d0e530f3137710bf0e723bd7b64dc89 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4regalloc.cpp')
-rw-r--r--src/qml/compiler/qv4regalloc.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4regalloc.cpp b/src/qml/compiler/qv4regalloc.cpp
index eaa9839f48..93ecdb2602 100644
--- a/src/qml/compiler/qv4regalloc.cpp
+++ b/src/qml/compiler/qv4regalloc.cpp
@@ -518,8 +518,15 @@ protected: // IRDecoder
|| (oper >= OpGt && oper <= OpStrictNotEqual)) {
needsCall = false;
}
- } if (oper == OpBitAnd || oper == OpBitOr || oper == OpBitXor || oper == OpLShift || oper == OpRShift || oper == OpURShift) {
+ } else if (oper == OpBitAnd || oper == OpBitOr || oper == OpBitXor || oper == OpLShift || oper == OpRShift || oper == OpURShift) {
needsCall = false;
+ } else if (oper == OpAdd
+ || oper == OpMul
+ ||
+ oper == OpSub
+ ) {
+ if (leftSource->type == SInt32Type && rightSource->type == SInt32Type)
+ needsCall = false;
}
addDef(target);