diff options
author | 2015-12-11 09:50:36 +0000 | |
---|---|---|
committer | 2015-12-11 16:13:44 +0000 | |
commit | 40a04bf64e5837fa48aceaffe970c9984c94084a (patch) | |
tree | 27aeff3b9492b396050155734d81aba3c57ffbb7 /compiler/optimizing/graph_checker.cc | |
parent | 763fd2d3d131898cad6295a19ae9a30e22ce5f2a (diff) |
Replace rotate patterns and invokes with HRor IR.
Replace constant and register version bitfield rotate patterns, and
rotateRight/Left intrinsic invokes, with new HRor IR.
Where k is constant and r is a register, with the UShr and Shl on
either side of a |, +, or ^, the following patterns are replaced:
x >>> #k OP x << #(reg_size - k)
x >>> #k OP x << #-k
x >>> r OP x << (#reg_size - r)
x >>> (#reg_size - r) OP x << r
x >>> r OP x << -r
x >>> -r OP x << r
Implemented for ARM/ARM64 & X86/X86_64.
Tests changed to not be inlined to prevent optimization from folding
them out. Additional tests added for constant rotate amounts.
Change-Id: I5847d104c0a0348e5792be6c5072ce5090ca2c34
Diffstat (limited to 'compiler/optimizing/graph_checker.cc')
-rw-r--r-- | compiler/optimizing/graph_checker.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc index c16b872466..dfc363f9fd 100644 --- a/compiler/optimizing/graph_checker.cc +++ b/compiler/optimizing/graph_checker.cc @@ -850,7 +850,7 @@ void SSAChecker::VisitCondition(HCondition* op) { void SSAChecker::VisitBinaryOperation(HBinaryOperation* op) { VisitInstruction(op); - if (op->IsUShr() || op->IsShr() || op->IsShl()) { + if (op->IsUShr() || op->IsShr() || op->IsShl() || op->IsRor()) { if (PrimitiveKind(op->InputAt(1)->GetType()) != Primitive::kPrimInt) { AddError(StringPrintf( "Shift operation %s %d has a non-int kind second input: " |