[turbofan] Truncation of Bit/Word8/16 to Word32 is a no-op.

TEST=mjsunit/compiler/regress-445859
BUG=chromium:445859
LOG=y
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/828313002

Cr-Commit-Position: refs/heads/master@{#25951}
This commit is contained in:
bmeurer 2015-01-02 02:39:00 -08:00 committed by Commit bot
parent cf866b7c61
commit fb2643c858
2 changed files with 12 additions and 1 deletions

View File

@ -181,7 +181,7 @@ class RepresentationSelector {
} else {
// In the change phase, insert a change before the use if necessary.
MachineTypeUnion output = GetInfo(input)->output;
if ((output & kRepWord32) == 0) {
if ((output & (kRepBit | kRepWord8 | kRepWord16 | kRepWord32)) == 0) {
// Output representation doesn't match usage.
TRACE((" truncate-to-int32: #%d:%s(@%d #%d:%s) ", node->id(),
node->op()->mnemonic(), index, input->id(),

View File

@ -0,0 +1,11 @@
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var foo = (function Module(global, env, buffer) {
"use asm";
var i8 = new global.Int8Array(buffer);
function foo() { i8[0] += 4294967295; }
return { foo: foo };
})(this, {}, new ArrayBuffer(64 * 1024)).foo;
foo();