Commit ce785b56 authored by bmeurer's avatar bmeurer Committed by Commit bot

[x86] Fix InstructionSelector::SupportedMachineOperatorFlags().

Word32 shifts are always safe on ia32 and x64, independent of whether
SSE4.1 is available.

R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26984}
parent 1a608493
...@@ -1071,13 +1071,14 @@ void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { ...@@ -1071,13 +1071,14 @@ void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) {
// static // static
MachineOperatorBuilder::Flags MachineOperatorBuilder::Flags
InstructionSelector::SupportedMachineOperatorFlags() { InstructionSelector::SupportedMachineOperatorFlags() {
MachineOperatorBuilder::Flags flags =
MachineOperatorBuilder::kWord32ShiftIsSafe;
if (CpuFeatures::IsSupported(SSE4_1)) { if (CpuFeatures::IsSupported(SSE4_1)) {
return MachineOperatorBuilder::kFloat64Floor | flags |= MachineOperatorBuilder::kFloat64Floor |
MachineOperatorBuilder::kFloat64Ceil | MachineOperatorBuilder::kFloat64Ceil |
MachineOperatorBuilder::kFloat64RoundTruncate | MachineOperatorBuilder::kFloat64RoundTruncate;
MachineOperatorBuilder::kWord32ShiftIsSafe;
} }
return MachineOperatorBuilder::Flag::kNoFlags; return flags;
} }
} // namespace compiler } // namespace compiler
......
...@@ -1374,13 +1374,14 @@ void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { ...@@ -1374,13 +1374,14 @@ void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) {
// static // static
MachineOperatorBuilder::Flags MachineOperatorBuilder::Flags
InstructionSelector::SupportedMachineOperatorFlags() { InstructionSelector::SupportedMachineOperatorFlags() {
MachineOperatorBuilder::Flags flags =
MachineOperatorBuilder::kWord32ShiftIsSafe;
if (CpuFeatures::IsSupported(SSE4_1)) { if (CpuFeatures::IsSupported(SSE4_1)) {
return MachineOperatorBuilder::kFloat64Floor | flags |= MachineOperatorBuilder::kFloat64Floor |
MachineOperatorBuilder::kFloat64Ceil | MachineOperatorBuilder::kFloat64Ceil |
MachineOperatorBuilder::kFloat64RoundTruncate | MachineOperatorBuilder::kFloat64RoundTruncate;
MachineOperatorBuilder::kWord32ShiftIsSafe;
} }
return MachineOperatorBuilder::kNoFlags; return flags;
} }
} // namespace compiler } // namespace compiler
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment