summaryrefslogtreecommitdiff
path: root/compiler/optimizing/instruction_builder.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2024-09-10 21:25:15 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2024-09-11 09:29:15 +0000
commit744830cb242c82c4637e6fb303b36d0371c84979 (patch)
tree843d73b277fb4057fa63f4dcf232640e0e688bce /compiler/optimizing/instruction_builder.cc
parent88c7e963f7861a1b92742150010ca7253f10023f (diff)
Revert "riscv64: Add node Rol, fix InstructionBuilder"
This reverts commit 39927bc359ccbe65371213c4559126b05dcfb117. Reason for revert: Failure on bot with: error: Statement could not be matched starting from line 1089612 TestRotate.java:95: rol {{a\d+}}, {{a\d+}}, {{a\d+}} ISA_FEATURES = {'rv64gcv_zba_zbb_zbs': True} READ_BARRIER_TYPE = baker 567-checker-builder-intrinsics FAILED: [run-test:1074] CFG checker failed $ ssh -q -F /b/s/w/ir/cache/builder/art/test/testrunner/ssh_config -p 10001 ubuntu@localhost "rm -rf /home/ubuntu/art-test-chroot/data/run-test/test-343039" 567-checker-builder-intrinsics files deleted from host and from target ---------- test-art-target-run-test-ndebug-prebuild-optimizing-no-relocate-ntrace-cms-checkjni-picimage-ndebuggable-no-jvmti-567-checker-builder-intrinsics64 Change-Id: Ic1fd87c331c9eba315af6c98c3ad393766327417
Diffstat (limited to 'compiler/optimizing/instruction_builder.cc')
-rw-r--r--compiler/optimizing/instruction_builder.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc
index 55e3267427..f3676bbc02 100644
--- a/compiler/optimizing/instruction_builder.cc
+++ b/compiler/optimizing/instruction_builder.cc
@@ -1953,16 +1953,14 @@ bool HInstructionBuilder::BuildSimpleIntrinsic(ArtMethod* method,
ReceiverArg receiver_arg = method->IsStatic() ? ReceiverArg::kNone : ReceiverArg::kNullCheckedArg;
HInstruction* instruction = nullptr;
switch (intrinsic) {
- case Intrinsics::kIntegerRotateLeft:
- instruction = new (allocator_) HRol(kInt32, /*value=*/ nullptr, /*distance=*/ nullptr);
- break;
case Intrinsics::kIntegerRotateRight:
+ case Intrinsics::kIntegerRotateLeft:
+ // For rotate left, we negate the distance below.
instruction = new (allocator_) HRor(kInt32, /*value=*/ nullptr, /*distance=*/ nullptr);
break;
- case Intrinsics::kLongRotateLeft:
- instruction = new (allocator_) HRol(kInt64, /*value=*/ nullptr, /*distance=*/ nullptr);
- break;
case Intrinsics::kLongRotateRight:
+ case Intrinsics::kLongRotateLeft:
+ // For rotate left, we negate the distance below.
instruction = new (allocator_) HRor(kInt64, /*value=*/ nullptr, /*distance=*/ nullptr);
break;
case Intrinsics::kIntegerCompare:
@@ -2081,6 +2079,15 @@ 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.