Ensure extract is seen as having scalar result.
Rationale:
Extracting from a vector yields a scalar, yet
our parallel mover and one DCHECK did not account
for that fact (note that moving towards a vector
type system will prevent such errors).
Regression test for this is part of the SAD CL.
Test: test-art-host test-art-target
Bug: 64091002
Change-Id: Id154edd1a069c54e7d8da069c368dea0a8f973f4
diff --git a/compiler/optimizing/ssa_liveness_analysis.cc b/compiler/optimizing/ssa_liveness_analysis.cc
index 185303b..754a762 100644
--- a/compiler/optimizing/ssa_liveness_analysis.cc
+++ b/compiler/optimizing/ssa_liveness_analysis.cc
@@ -474,7 +474,9 @@
// For a SIMD operation, compute the number of needed spill slots.
// TODO: do through vector type?
HInstruction* definition = GetParent()->GetDefinedBy();
- if (definition != nullptr && definition->IsVecOperation()) {
+ if (definition != nullptr &&
+ definition->IsVecOperation() &&
+ !definition->IsVecExtractScalar()) {
return definition->AsVecOperation()->GetVectorNumberOfBytes() / kVRegSize;
}
// Return number of needed spill slots based on type.