From 22c4922c6b31e154a6814c4abe9015d9ba156911 Mon Sep 17 00:00:00 2001 From: Roland Levillain Date: Fri, 18 Mar 2016 14:04:28 +0000 Subject: Ensure art::HRor support boolean, byte, short and char inputs. Also extend tests covering the IntegerRotateLeft, LongRotateLeft, IntegerRotateRight and LongRotateRight intrinsics and their translation into an art::HRor instruction. Bug: 27682579 Change-Id: I89f6ea6a7315659a172482bf09875cfb7e7422a1 --- compiler/optimizing/nodes.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index e2a54f42ce..46377ee503 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -4689,7 +4689,12 @@ class HXor : public HBinaryOperation { class HRor : public HBinaryOperation { public: HRor(Primitive::Type result_type, HInstruction* value, HInstruction* distance) - : HBinaryOperation(result_type, value, distance) {} + : HBinaryOperation(result_type, value, distance) { + if (kIsDebugBuild) { + DCHECK_EQ(result_type, Primitive::PrimitiveKind(value->GetType())); + DCHECK_EQ(Primitive::kPrimInt, Primitive::PrimitiveKind(distance->GetType())); + } + } template T Compute(T x, U y, V max_shift_value) const { -- cgit v1.2.3-59-g8ed1b