[turbofan] Get rid of truncation by store.

Nowadays, representation inference and simplified lowering can insert the
right truncations based on the use.

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

Cr-Commit-Position: refs/heads/master@{#32747}
This commit is contained in:
jarin 2015-12-10 03:23:09 -08:00 committed by Commit bot
parent 40817d2242
commit 9c87bd4b82
2 changed files with 0 additions and 16 deletions

View File

@ -1063,15 +1063,6 @@ Reduction JSTypedLowering::ReduceJSStoreProperty(Node* node) {
frame_state_for_to_number, effect, control);
}
}
// For integer-typed arrays, convert to the integer type.
if (access.machine_type().semantic() == MachineSemantic::kInt32 &&
!value_type->Is(Type::Signed32())) {
value = graph()->NewNode(simplified()->NumberToInt32(), value);
} else if (access.machine_type().semantic() ==
MachineSemantic::kUint32 &&
!value_type->Is(Type::Unsigned32())) {
value = graph()->NewNode(simplified()->NumberToUint32(), value);
}
// Check if we can avoid the bounds check.
if (key_type->Min() >= 0 && key_type->Max() < array->length_value()) {
RelaxControls(node);

View File

@ -782,13 +782,6 @@ TEST_F(JSTypedLoweringTest, JSStorePropertyToExternalTypedArrayWithConversion) {
Matcher<Node*> value_matcher =
IsToNumber(value, context, effect, control);
Matcher<Node*> effect_matcher = value_matcher;
if (AccessBuilder::ForTypedArrayElement(type, true)
.type->Is(Type::Signed32())) {
value_matcher = IsNumberToInt32(value_matcher);
} else if (AccessBuilder::ForTypedArrayElement(type, true)
.type->Is(Type::Unsigned32())) {
value_matcher = IsNumberToUint32(value_matcher);
}
ASSERT_TRUE(r.Changed());
EXPECT_THAT(