diff options
author | 2024-09-11 16:29:10 +0000 | |
---|---|---|
committer | 2024-09-13 09:28:01 +0000 | |
commit | d0bc68e1f40259230329e6709c72af187f72144c (patch) | |
tree | 0fbe11c2b48441b1b40d598883611ece8148352d /compiler/optimizing/instruction_builder.cc | |
parent | d0929a5662cf29440667e40fadcf839e5fb8aa45 (diff) |
riscv64: Add node Rol, fix InstructionBuilder
This reverts commit 744830cb242c82c4637e6fb303b36d0371c84979.
Reason for revert: updated CHECKer test to use rolw instead of rol.
Change-Id: I50e34c6ac69488a9c083f04c6382df4302e8e7d3
Diffstat (limited to 'compiler/optimizing/instruction_builder.cc')
-rw-r--r-- | compiler/optimizing/instruction_builder.cc | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index f3676bbc02..55e3267427 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -1953,14 +1953,16 @@ bool HInstructionBuilder::BuildSimpleIntrinsic(ArtMethod* method, ReceiverArg receiver_arg = method->IsStatic() ? ReceiverArg::kNone : ReceiverArg::kNullCheckedArg; HInstruction* instruction = nullptr; switch (intrinsic) { - case Intrinsics::kIntegerRotateRight: case Intrinsics::kIntegerRotateLeft: - // For rotate left, we negate the distance below. + instruction = new (allocator_) HRol(kInt32, /*value=*/ nullptr, /*distance=*/ nullptr); + break; + case Intrinsics::kIntegerRotateRight: instruction = new (allocator_) HRor(kInt32, /*value=*/ nullptr, /*distance=*/ nullptr); break; - case Intrinsics::kLongRotateRight: case Intrinsics::kLongRotateLeft: - // For rotate left, we negate the distance below. + instruction = new (allocator_) HRol(kInt64, /*value=*/ nullptr, /*distance=*/ nullptr); + break; + case Intrinsics::kLongRotateRight: instruction = new (allocator_) HRor(kInt64, /*value=*/ nullptr, /*distance=*/ nullptr); break; case Intrinsics::kIntegerCompare: @@ -2079,15 +2081,6 @@ bool HInstructionBuilder::BuildSimpleIntrinsic(ArtMethod* method, } switch (intrinsic) { - case Intrinsics::kIntegerRotateLeft: - case Intrinsics::kLongRotateLeft: { - // Negate the distance value for rotate left. - DCHECK(instruction->IsRor()); - HNeg* neg = new (allocator_) HNeg(kInt32, instruction->InputAt(1u)); - AppendInstruction(neg); - instruction->SetRawInputAt(1u, neg); - break; - } case Intrinsics::kFloatIsNaN: case Intrinsics::kDoubleIsNaN: // Set the second input to be the same as first. |