Try to preserve dex pc better in vector code.

Also improves a few comment and uses new data
type method to test type consistency.

Test: test-art-host

Change-Id: I4a17f9d5bc458a091a259dd45ebcdc6531abbf84
diff --git a/compiler/optimizing/data_type.h b/compiler/optimizing/data_type.h
index 5a023ad..3b67efe 100644
--- a/compiler/optimizing/data_type.h
+++ b/compiler/optimizing/data_type.h
@@ -126,18 +126,6 @@
     return type == Type::kUint8 || type == Type::kUint16;
   }
 
-  static Type ToSignedType(Type type) {
-    switch (type) {
-      case Type::kUint8:
-        return Type::kInt8;
-      case Type::kUint16:
-        return Type::kInt16;
-      default:
-        DCHECK(type != Type::kVoid && type != Type::kReference);
-        return type;
-    }
-  }
-
   // Return the general kind of `type`, fusing integer-like types as Type::kInt.
   static Type Kind(Type type) {
     switch (type) {
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc
index 36ff2a9..6610bcc 100644
--- a/compiler/optimizing/instruction_simplifier.cc
+++ b/compiler/optimizing/instruction_simplifier.cc
@@ -313,7 +313,8 @@
                                                mul->GetLeft(),
                                                mul->GetRight(),
                                                binop->GetPackedType(),
-                                               binop->GetVectorLength());
+                                               binop->GetVectorLength(),
+                                               binop->GetDexPc());
 
         binop->GetBlock()->ReplaceAndRemoveInstructionWith(binop, mulacc);
         DCHECK(!mul->HasUses());
diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc
index 2090a12..c51fafa 100644
--- a/compiler/optimizing/loop_optimization.cc
+++ b/compiler/optimizing/loop_optimization.cc
@@ -1123,7 +1123,7 @@
     HInstruction* base = instruction->InputAt(0);
     HInstruction* index = instruction->InputAt(1);
     HInstruction* offset = nullptr;
-    if (DataType::ToSignedType(type) == DataType::ToSignedType(instruction->GetType()) &&
+    if (HVecOperation::ToSignedType(type) == HVecOperation::ToSignedType(instruction->GetType()) &&
         node->loop_info->IsDefinedOutOfTheLoop(base) &&
         induction_range_.IsUnitStride(instruction, index, graph_, &offset)) {
       if (generate_code) {
@@ -1520,7 +1520,7 @@
                        new (global_allocator_) HTypeConversion(type, input, kNoDexPc));
       }
       vector = new (global_allocator_)
-          HVecReplicateScalar(global_allocator_, input, type, vector_length_);
+          HVecReplicateScalar(global_allocator_, input, type, vector_length_, kNoDexPc);
       vector_permanent_map_->Put(org, Insert(vector_preheader_, vector));
     }
     vector_map_->Put(org, vector);
@@ -1546,13 +1546,14 @@
                                        HInstruction* opb,
                                        HInstruction* offset,
                                        DataType::Type type) {
+  uint32_t dex_pc = org->GetDexPc();
   HInstruction* vector = nullptr;
   if (vector_mode_ == kVector) {
     // Vector store or load.
     HInstruction* base = org->InputAt(0);
     if (opb != nullptr) {
       vector = new (global_allocator_) HVecStore(
-          global_allocator_, base, opa, opb, type, org->GetSideEffects(), vector_length_);
+          global_allocator_, base, opa, opb, type, org->GetSideEffects(), vector_length_, dex_pc);
     } else  {
       bool is_string_char_at = org->AsArrayGet()->IsStringCharAt();
       vector = new (global_allocator_) HVecLoad(global_allocator_,
@@ -1561,7 +1562,8 @@
                                                 type,
                                                 org->GetSideEffects(),
                                                 vector_length_,
-                                                is_string_char_at);
+                                                is_string_char_at,
+                                                dex_pc);
     }
     // Known dynamically enforced alignment?
     if (vector_peeling_candidate_ != nullptr &&
@@ -1574,11 +1576,11 @@
     DCHECK(vector_mode_ == kSequential);
     if (opb != nullptr) {
       vector = new (global_allocator_) HArraySet(
-          org->InputAt(0), opa, opb, type, org->GetSideEffects(), kNoDexPc);
+          org->InputAt(0), opa, opb, type, org->GetSideEffects(), dex_pc);
     } else  {
       bool is_string_char_at = org->AsArrayGet()->IsStringCharAt();
       vector = new (global_allocator_) HArrayGet(
-          org->InputAt(0), opa, type, org->GetSideEffects(), kNoDexPc, is_string_char_at);
+          org->InputAt(0), opa, type, org->GetSideEffects(), dex_pc, is_string_char_at);
     }
   }
   vector_map_->Put(org, vector);
@@ -1627,7 +1629,8 @@
                                                              &new_init,
                                                              type,
                                                              vector_length,
-                                                             1));
+                                                             1,
+                                                             kNoDexPc));
   } else {
     new_init = ReduceAndExtractIfNeeded(new_init);
   }
@@ -1653,10 +1656,10 @@
       //    y = x_1
       // along the exit of the defining loop.
       HInstruction* reduce = new (global_allocator_) HVecReduce(
-          global_allocator_, instruction, type, vector_length, kind);
+          global_allocator_, instruction, type, vector_length, kind, kNoDexPc);
       exit->InsertInstructionBefore(reduce, exit->GetFirstInstruction());
       instruction = new (global_allocator_) HVecExtractScalar(
-          global_allocator_, reduce, type, vector_length, 0);
+          global_allocator_, reduce, type, vector_length, 0, kNoDexPc);
       exit->InsertInstructionAfter(instruction, reduce);
     }
   }
@@ -1677,69 +1680,70 @@
                                       HInstruction* opb,
                                       DataType::Type type,
                                       bool is_unsigned) {
+  uint32_t dex_pc = org->GetDexPc();
   HInstruction* vector = nullptr;
   DataType::Type org_type = org->GetType();
   switch (org->GetKind()) {
     case HInstruction::kNeg:
       DCHECK(opb == nullptr);
       GENERATE_VEC(
-          new (global_allocator_) HVecNeg(global_allocator_, opa, type, vector_length_),
-          new (global_allocator_) HNeg(org_type, opa));
+        new (global_allocator_) HVecNeg(global_allocator_, opa, type, vector_length_, dex_pc),
+        new (global_allocator_) HNeg(org_type, opa, dex_pc));
     case HInstruction::kNot:
       DCHECK(opb == nullptr);
       GENERATE_VEC(
-          new (global_allocator_) HVecNot(global_allocator_, opa, type, vector_length_),
-          new (global_allocator_) HNot(org_type, opa));
+        new (global_allocator_) HVecNot(global_allocator_, opa, type, vector_length_, dex_pc),
+        new (global_allocator_) HNot(org_type, opa, dex_pc));
     case HInstruction::kBooleanNot:
       DCHECK(opb == nullptr);
       GENERATE_VEC(
-          new (global_allocator_) HVecNot(global_allocator_, opa, type, vector_length_),
-          new (global_allocator_) HBooleanNot(opa));
+        new (global_allocator_) HVecNot(global_allocator_, opa, type, vector_length_, dex_pc),
+        new (global_allocator_) HBooleanNot(opa, dex_pc));
     case HInstruction::kTypeConversion:
       DCHECK(opb == nullptr);
       GENERATE_VEC(
-          new (global_allocator_) HVecCnv(global_allocator_, opa, type, vector_length_),
-          new (global_allocator_) HTypeConversion(org_type, opa, kNoDexPc));
+        new (global_allocator_) HVecCnv(global_allocator_, opa, type, vector_length_, dex_pc),
+        new (global_allocator_) HTypeConversion(org_type, opa, dex_pc));
     case HInstruction::kAdd:
       GENERATE_VEC(
-          new (global_allocator_) HVecAdd(global_allocator_, opa, opb, type, vector_length_),
-          new (global_allocator_) HAdd(org_type, opa, opb));
+        new (global_allocator_) HVecAdd(global_allocator_, opa, opb, type, vector_length_, dex_pc),
+        new (global_allocator_) HAdd(org_type, opa, opb, dex_pc));
     case HInstruction::kSub:
       GENERATE_VEC(
-          new (global_allocator_) HVecSub(global_allocator_, opa, opb, type, vector_length_),
-          new (global_allocator_) HSub(org_type, opa, opb));
+        new (global_allocator_) HVecSub(global_allocator_, opa, opb, type, vector_length_, dex_pc),
+        new (global_allocator_) HSub(org_type, opa, opb, dex_pc));
     case HInstruction::kMul:
       GENERATE_VEC(
-          new (global_allocator_) HVecMul(global_allocator_, opa, opb, type, vector_length_),
-          new (global_allocator_) HMul(org_type, opa, opb));
+        new (global_allocator_) HVecMul(global_allocator_, opa, opb, type, vector_length_, dex_pc),
+        new (global_allocator_) HMul(org_type, opa, opb, dex_pc));
     case HInstruction::kDiv:
       GENERATE_VEC(
-          new (global_allocator_) HVecDiv(global_allocator_, opa, opb, type, vector_length_),
-          new (global_allocator_) HDiv(org_type, opa, opb, kNoDexPc));
+        new (global_allocator_) HVecDiv(global_allocator_, opa, opb, type, vector_length_, dex_pc),
+        new (global_allocator_) HDiv(org_type, opa, opb, dex_pc));
     case HInstruction::kAnd:
       GENERATE_VEC(
-          new (global_allocator_) HVecAnd(global_allocator_, opa, opb, type, vector_length_),
-          new (global_allocator_) HAnd(org_type, opa, opb));
+        new (global_allocator_) HVecAnd(global_allocator_, opa, opb, type, vector_length_, dex_pc),
+        new (global_allocator_) HAnd(org_type, opa, opb, dex_pc));
     case HInstruction::kOr:
       GENERATE_VEC(
-          new (global_allocator_) HVecOr(global_allocator_, opa, opb, type, vector_length_),
-          new (global_allocator_) HOr(org_type, opa, opb));
+        new (global_allocator_) HVecOr(global_allocator_, opa, opb, type, vector_length_, dex_pc),
+        new (global_allocator_) HOr(org_type, opa, opb, dex_pc));
     case HInstruction::kXor:
       GENERATE_VEC(
-          new (global_allocator_) HVecXor(global_allocator_, opa, opb, type, vector_length_),
-          new (global_allocator_) HXor(org_type, opa, opb));
+        new (global_allocator_) HVecXor(global_allocator_, opa, opb, type, vector_length_, dex_pc),
+        new (global_allocator_) HXor(org_type, opa, opb, dex_pc));
     case HInstruction::kShl:
       GENERATE_VEC(
-          new (global_allocator_) HVecShl(global_allocator_, opa, opb, type, vector_length_),
-          new (global_allocator_) HShl(org_type, opa, opb));
+        new (global_allocator_) HVecShl(global_allocator_, opa, opb, type, vector_length_, dex_pc),
+        new (global_allocator_) HShl(org_type, opa, opb, dex_pc));
     case HInstruction::kShr:
       GENERATE_VEC(
-          new (global_allocator_) HVecShr(global_allocator_, opa, opb, type, vector_length_),
-          new (global_allocator_) HShr(org_type, opa, opb));
+        new (global_allocator_) HVecShr(global_allocator_, opa, opb, type, vector_length_, dex_pc),
+        new (global_allocator_) HShr(org_type, opa, opb, dex_pc));
     case HInstruction::kUShr:
       GENERATE_VEC(
-          new (global_allocator_) HVecUShr(global_allocator_, opa, opb, type, vector_length_),
-          new (global_allocator_) HUShr(org_type, opa, opb));
+        new (global_allocator_) HVecUShr(global_allocator_, opa, opb, type, vector_length_, dex_pc),
+        new (global_allocator_) HUShr(org_type, opa, opb, dex_pc));
     case HInstruction::kInvokeStaticOrDirect: {
       HInvokeStaticOrDirect* invoke = org->AsInvokeStaticOrDirect();
       if (vector_mode_ == kVector) {
@@ -1749,7 +1753,8 @@
           case Intrinsics::kMathAbsFloat:
           case Intrinsics::kMathAbsDouble:
             DCHECK(opb == nullptr);
-            vector = new (global_allocator_) HVecAbs(global_allocator_, opa, type, vector_length_);
+            vector = new (global_allocator_)
+                HVecAbs(global_allocator_, opa, type, vector_length_, dex_pc);
             break;
           case Intrinsics::kMathMinIntInt:
           case Intrinsics::kMathMinLongLong:
@@ -1757,7 +1762,7 @@
           case Intrinsics::kMathMinDoubleDouble: {
             NormalizePackedType(&type, &is_unsigned);
             vector = new (global_allocator_)
-                HVecMin(global_allocator_, opa, opb, type, vector_length_, is_unsigned);
+                HVecMin(global_allocator_, opa, opb, type, vector_length_, is_unsigned, dex_pc);
             break;
           }
           case Intrinsics::kMathMaxIntInt:
@@ -1766,7 +1771,7 @@
           case Intrinsics::kMathMaxDoubleDouble: {
             NormalizePackedType(&type, &is_unsigned);
             vector = new (global_allocator_)
-                HVecMax(global_allocator_, opa, opb, type, vector_length_, is_unsigned);
+                HVecMax(global_allocator_, opa, opb, type, vector_length_, is_unsigned, dex_pc);
             break;
           }
           default:
@@ -1885,7 +1890,8 @@
                 type,
                 vector_length_,
                 is_rounded,
-                is_unsigned));
+                is_unsigned,
+                kNoDexPc));
             MaybeRecordStat(stats_, MethodCompilationStat::kLoopVectorizedIdiom);
           } else {
             GenerateVecOp(instruction, vector_map_->Get(r), vector_map_->Get(s), type);
@@ -1981,7 +1987,8 @@
             vector_map_->Get(r),
             vector_map_->Get(s),
             reduction_type,
-            GetOtherVL(reduction_type, sub_type, vector_length_)));
+            GetOtherVL(reduction_type, sub_type, vector_length_),
+            kNoDexPc));
         MaybeRecordStat(stats_, MethodCompilationStat::kLoopVectorizedIdiom);
       } else {
         GenerateVecOp(v, vector_map_->Get(r), nullptr, reduction_type);
diff --git a/compiler/optimizing/nodes_vector.h b/compiler/optimizing/nodes_vector.h
index d01f8c0..8f3ab11 100644
--- a/compiler/optimizing/nodes_vector.h
+++ b/compiler/optimizing/nodes_vector.h
@@ -34,7 +34,7 @@
     DCHECK(IsPowerOfTwo(base));
   }
 
-  // Returns true if memory is "at least" aligned at the given boundary.
+  // Returns true if memory is at least aligned at the given boundary.
   // Assumes requested base is power of two.
   bool IsAlignedAt(size_t base) const {
     DCHECK_NE(0u, base);
@@ -42,6 +42,10 @@
     return ((offset_ | base_) & (base - 1u)) == 0;
   }
 
+  size_t Base() const { return base_; }
+
+  size_t Offset() const { return offset_; }
+
   std::string ToString() const {
     return "ALIGN(" + std::to_string(base_) + "," + std::to_string(offset_) + ")";
   }
@@ -116,6 +120,22 @@
     return GetVectorLength() == o->GetVectorLength() && GetPackedType() == o->GetPackedType();
   }
 
+  // Maps an integral type to the same-size signed type and leaves other types alone.
+  // Can be used to test relaxed type consistency in which packed same-size integral
+  // types can co-exist, but other type mixes are an error.
+  static DataType::Type ToSignedType(DataType::Type type) {
+    switch (type) {
+      case DataType::Type::kBool:  // 1-byte storage unit
+      case DataType::Type::kUint8:
+        return DataType::Type::kInt8;
+      case DataType::Type::kUint16:
+        return DataType::Type::kInt16;
+      default:
+        DCHECK(type != DataType::Type::kVoid && type != DataType::Type::kReference) << type;
+        return type;
+    }
+  }
+
   DECLARE_ABSTRACT_INSTRUCTION(VecOperation);
 
  protected:
@@ -187,8 +207,7 @@
 };
 
 // Abstraction of a vector operation that references memory, with an alignment.
-// The Android runtime guarantees at least "component size" alignment for array
-// elements and, thus, vectors.
+// The Android runtime guarantees elements have at least natural alignment.
 class HVecMemoryOperation : public HVecOperation {
  public:
   HVecMemoryOperation(ArenaAllocator* arena,
@@ -230,20 +249,7 @@
   }
   DCHECK(input->IsVecOperation());
   DataType::Type input_type = input->AsVecOperation()->GetPackedType();
-  switch (input_type) {
-    case DataType::Type::kBool:
-    case DataType::Type::kUint8:
-    case DataType::Type::kInt8:
-      return type == DataType::Type::kBool ||
-             type == DataType::Type::kUint8 ||
-             type == DataType::Type::kInt8;
-    case DataType::Type::kUint16:
-    case DataType::Type::kInt16:
-      return type == DataType::Type::kUint16 ||
-             type == DataType::Type::kInt16;
-    default:
-      return type == input_type;
-  }
+  return HVecOperation::ToSignedType(input_type) == HVecOperation::ToSignedType(type);
 }
 
 //
@@ -258,7 +264,7 @@
                       HInstruction* scalar,
                       DataType::Type packed_type,
                       size_t vector_length,
-                      uint32_t dex_pc = kNoDexPc)
+                      uint32_t dex_pc)
       : HVecUnaryOperation(arena, scalar, packed_type, vector_length, dex_pc) {
     DCHECK(!scalar->IsVecOperation());
   }
@@ -284,7 +290,7 @@
                     DataType::Type packed_type,
                     size_t vector_length,
                     size_t index,
-                    uint32_t dex_pc = kNoDexPc)
+                    uint32_t dex_pc)
       : HVecUnaryOperation(arena, input, packed_type, vector_length, dex_pc) {
     DCHECK(HasConsistentPackedTypes(input, packed_type));
     DCHECK_LT(index, vector_length);
@@ -322,7 +328,7 @@
              DataType::Type packed_type,
              size_t vector_length,
              ReductionKind kind,
-             uint32_t dex_pc = kNoDexPc)
+             uint32_t dex_pc)
       : HVecUnaryOperation(arena, input, packed_type, vector_length, dex_pc),
         kind_(kind) {
     DCHECK(HasConsistentPackedTypes(input, packed_type));
@@ -354,7 +360,7 @@
           HInstruction* input,
           DataType::Type packed_type,
           size_t vector_length,
-          uint32_t dex_pc = kNoDexPc)
+          uint32_t dex_pc)
       : HVecUnaryOperation(arena, input, packed_type, vector_length, dex_pc) {
     DCHECK(input->IsVecOperation());
     DCHECK_NE(GetInputType(), GetResultType());  // actual convert
@@ -379,7 +385,7 @@
           HInstruction* input,
           DataType::Type packed_type,
           size_t vector_length,
-          uint32_t dex_pc = kNoDexPc)
+          uint32_t dex_pc)
       : HVecUnaryOperation(arena, input, packed_type, vector_length, dex_pc) {
     DCHECK(HasConsistentPackedTypes(input, packed_type));
   }
@@ -393,14 +399,15 @@
 };
 
 // Takes absolute value of every component in the vector,
-// viz. abs[ x1, .. , xn ]  = [ |x1|, .. , |xn| ].
+// viz. abs[ x1, .. , xn ]  = [ |x1|, .. , |xn| ]
+// for signed operand x.
 class HVecAbs FINAL : public HVecUnaryOperation {
  public:
   HVecAbs(ArenaAllocator* arena,
           HInstruction* input,
           DataType::Type packed_type,
           size_t vector_length,
-          uint32_t dex_pc = kNoDexPc)
+          uint32_t dex_pc)
       : HVecUnaryOperation(arena, input, packed_type, vector_length, dex_pc) {
     DCHECK(HasConsistentPackedTypes(input, packed_type));
   }
@@ -422,7 +429,7 @@
           HInstruction* input,
           DataType::Type packed_type,
           size_t vector_length,
-          uint32_t dex_pc = kNoDexPc)
+          uint32_t dex_pc)
       : HVecUnaryOperation(arena, input, packed_type, vector_length, dex_pc) {
     DCHECK(input->IsVecOperation());
   }
@@ -448,7 +455,7 @@
           HInstruction* right,
           DataType::Type packed_type,
           size_t vector_length,
-          uint32_t dex_pc = kNoDexPc)
+          uint32_t dex_pc)
       : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     DCHECK(HasConsistentPackedTypes(left, packed_type));
     DCHECK(HasConsistentPackedTypes(right, packed_type));
@@ -465,7 +472,7 @@
 // Performs halving add on every component in the two vectors, viz.
 // rounded   [ x1, .. , xn ] hradd [ y1, .. , yn ] = [ (x1 + y1 + 1) >> 1, .. , (xn + yn + 1) >> 1 ]
 // truncated [ x1, .. , xn ] hadd  [ y1, .. , yn ] = [ (x1 + y1)     >> 1, .. , (xn + yn )    >> 1 ]
-// for signed operands x, y (sign extension) or unsigned operands x, y (zero extension).
+// for either both signed or both unsigned operands x, y.
 class HVecHalvingAdd FINAL : public HVecBinaryOperation {
  public:
   HVecHalvingAdd(ArenaAllocator* arena,
@@ -474,8 +481,9 @@
                  DataType::Type packed_type,
                  size_t vector_length,
                  bool is_rounded,
-                 bool is_unsigned = false)
-      : HVecBinaryOperation(arena, left, right, packed_type, vector_length, kNoDexPc) {
+                 bool is_unsigned,
+                 uint32_t dex_pc)
+      : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     // The `is_unsigned` flag should be used exclusively with the Int32 or Int64.
     // This flag is a temporary measure while we do not have the Uint32 and Uint64 data types.
     DCHECK(!is_unsigned ||
@@ -521,7 +529,7 @@
           HInstruction* right,
           DataType::Type packed_type,
           size_t vector_length,
-          uint32_t dex_pc = kNoDexPc)
+          uint32_t dex_pc)
       : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     DCHECK(HasConsistentPackedTypes(left, packed_type));
     DCHECK(HasConsistentPackedTypes(right, packed_type));
@@ -544,7 +552,7 @@
           HInstruction* right,
           DataType::Type packed_type,
           size_t vector_length,
-          uint32_t dex_pc = kNoDexPc)
+          uint32_t dex_pc)
       : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     DCHECK(HasConsistentPackedTypes(left, packed_type));
     DCHECK(HasConsistentPackedTypes(right, packed_type));
@@ -567,7 +575,7 @@
           HInstruction* right,
           DataType::Type packed_type,
           size_t vector_length,
-          uint32_t dex_pc = kNoDexPc)
+          uint32_t dex_pc)
       : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     DCHECK(HasConsistentPackedTypes(left, packed_type));
     DCHECK(HasConsistentPackedTypes(right, packed_type));
@@ -582,7 +590,8 @@
 };
 
 // Takes minimum of every component in the two vectors,
-// viz. MIN( [ x1, .. , xn ] , [ y1, .. , yn ]) = [ min(x1, y1), .. , min(xn, yn) ].
+// viz. MIN( [ x1, .. , xn ] , [ y1, .. , yn ]) = [ min(x1, y1), .. , min(xn, yn) ]
+// for either both signed or both unsigned operands x, y.
 class HVecMin FINAL : public HVecBinaryOperation {
  public:
   HVecMin(ArenaAllocator* arena,
@@ -590,8 +599,9 @@
           HInstruction* right,
           DataType::Type packed_type,
           size_t vector_length,
-          bool is_unsigned = false)
-      : HVecBinaryOperation(arena, left, right, packed_type, vector_length, kNoDexPc) {
+          bool is_unsigned,
+          uint32_t dex_pc)
+      : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     // The `is_unsigned` flag should be used exclusively with the Int32 or Int64.
     // This flag is a temporary measure while we do not have the Uint32 and Uint64 data types.
     DCHECK(!is_unsigned ||
@@ -624,7 +634,8 @@
 };
 
 // Takes maximum of every component in the two vectors,
-// viz. MAX( [ x1, .. , xn ] , [ y1, .. , yn ]) = [ max(x1, y1), .. , max(xn, yn) ].
+// viz. MAX( [ x1, .. , xn ] , [ y1, .. , yn ]) = [ max(x1, y1), .. , max(xn, yn) ]
+// for either both signed or both unsigned operands x, y.
 class HVecMax FINAL : public HVecBinaryOperation {
  public:
   HVecMax(ArenaAllocator* arena,
@@ -632,8 +643,9 @@
           HInstruction* right,
           DataType::Type packed_type,
           size_t vector_length,
-          bool is_unsigned = false)
-      : HVecBinaryOperation(arena, left, right, packed_type, vector_length, kNoDexPc) {
+          bool is_unsigned,
+          uint32_t dex_pc)
+      : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     // The `is_unsigned` flag should be used exclusively with the Int32 or Int64.
     // This flag is a temporary measure while we do not have the Uint32 and Uint64 data types.
     DCHECK(!is_unsigned ||
@@ -674,7 +686,7 @@
           HInstruction* right,
           DataType::Type packed_type,
           size_t vector_length,
-          uint32_t dex_pc = kNoDexPc)
+          uint32_t dex_pc)
       : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     DCHECK(left->IsVecOperation() && right->IsVecOperation());
   }
@@ -696,7 +708,7 @@
              HInstruction* right,
              DataType::Type packed_type,
              size_t vector_length,
-             uint32_t dex_pc = kNoDexPc)
+             uint32_t dex_pc)
          : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     DCHECK(left->IsVecOperation() && right->IsVecOperation());
   }
@@ -718,7 +730,7 @@
          HInstruction* right,
          DataType::Type packed_type,
          size_t vector_length,
-         uint32_t dex_pc = kNoDexPc)
+         uint32_t dex_pc)
       : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     DCHECK(left->IsVecOperation() && right->IsVecOperation());
   }
@@ -740,7 +752,7 @@
           HInstruction* right,
           DataType::Type packed_type,
           size_t vector_length,
-          uint32_t dex_pc = kNoDexPc)
+          uint32_t dex_pc)
       : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     DCHECK(left->IsVecOperation() && right->IsVecOperation());
   }
@@ -762,7 +774,7 @@
           HInstruction* right,
           DataType::Type packed_type,
           size_t vector_length,
-          uint32_t dex_pc = kNoDexPc)
+          uint32_t dex_pc)
       : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     DCHECK(HasConsistentPackedTypes(left, packed_type));
   }
@@ -784,7 +796,7 @@
           HInstruction* right,
           DataType::Type packed_type,
           size_t vector_length,
-          uint32_t dex_pc = kNoDexPc)
+          uint32_t dex_pc)
       : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     DCHECK(HasConsistentPackedTypes(left, packed_type));
   }
@@ -806,7 +818,7 @@
            HInstruction* right,
            DataType::Type packed_type,
            size_t vector_length,
-           uint32_t dex_pc = kNoDexPc)
+           uint32_t dex_pc)
       : HVecBinaryOperation(arena, left, right, packed_type, vector_length, dex_pc) {
     DCHECK(HasConsistentPackedTypes(left, packed_type));
   }
@@ -833,7 +845,7 @@
                  DataType::Type packed_type,
                  size_t vector_length,
                  size_t number_of_scalars,
-                 uint32_t dex_pc = kNoDexPc)
+                 uint32_t dex_pc)
       : HVecOperation(arena,
                       packed_type,
                       SideEffects::None(),
@@ -867,7 +879,7 @@
                          HInstruction* mul_right,
                          DataType::Type packed_type,
                          size_t vector_length,
-                         uint32_t dex_pc = kNoDexPc)
+                         uint32_t dex_pc)
       : HVecOperation(arena,
                       packed_type,
                       SideEffects::None(),
@@ -905,9 +917,9 @@
 
 // Takes the absolute difference of two vectors, and adds the results to
 // same-precision or wider-precision components in the accumulator,
-// viz. SAD([ a1, .. , am ], [ x1, .. , xn ], [ y1, .. , yn ] =
+// viz. SAD([ a1, .. , am ], [ x1, .. , xn ], [ y1, .. , yn ]) =
 //          [ a1 + sum abs(xi-yi), .. , am + sum abs(xj-yj) ],
-//      for m <= n and non-overlapping sums.
+//      for m <= n, non-overlapping sums, and signed operands x, y.
 class HVecSADAccumulate FINAL : public HVecOperation {
  public:
   HVecSADAccumulate(ArenaAllocator* arena,
@@ -916,7 +928,7 @@
                     HInstruction* sad_right,
                     DataType::Type packed_type,
                     size_t vector_length,
-                    uint32_t dex_pc = kNoDexPc)
+                    uint32_t dex_pc)
       : HVecOperation(arena,
                       packed_type,
                       SideEffects::None(),
@@ -950,7 +962,7 @@
            SideEffects side_effects,
            size_t vector_length,
            bool is_string_char_at,
-           uint32_t dex_pc = kNoDexPc)
+           uint32_t dex_pc)
       : HVecMemoryOperation(arena,
                             packed_type,
                             side_effects,
@@ -994,7 +1006,7 @@
             DataType::Type packed_type,
             SideEffects side_effects,
             size_t vector_length,
-            uint32_t dex_pc = kNoDexPc)
+            uint32_t dex_pc)
       : HVecMemoryOperation(arena,
                             packed_type,
                             side_effects,
diff --git a/compiler/optimizing/nodes_vector_test.cc b/compiler/optimizing/nodes_vector_test.cc
index 7dbfcda..d3a499c 100644
--- a/compiler/optimizing/nodes_vector_test.cc
+++ b/compiler/optimizing/nodes_vector_test.cc
@@ -42,11 +42,6 @@
     graph_->AddBlock(exit_block_);
     graph_->SetEntryBlock(entry_block_);
     graph_->SetExitBlock(exit_block_);
-    parameter_ = new (&allocator_) HParameterValue(graph_->GetDexFile(),
-                                                   dex::TypeIndex(0),
-                                                   0,
-                                                   DataType::Type::kInt32);
-    entry_block_->AddInstruction(parameter_);
     int8_parameter_ = new (&allocator_) HParameterValue(graph_->GetDexFile(),
                                                         dex::TypeIndex(1),
                                                         0,
@@ -57,6 +52,11 @@
                                                          0,
                                                          DataType::Type::kInt16);
     entry_block_->AddInstruction(int16_parameter_);
+    int32_parameter_ = new (&allocator_) HParameterValue(graph_->GetDexFile(),
+                                                         dex::TypeIndex(0),
+                                                         0,
+                                                         DataType::Type::kInt32);
+    entry_block_->AddInstruction(int32_parameter_);
   }
 
   // General building fields.
@@ -67,9 +67,9 @@
   HBasicBlock* entry_block_;
   HBasicBlock* exit_block_;
 
-  HInstruction* parameter_;
   HInstruction* int8_parameter_;
   HInstruction* int16_parameter_;
+  HInstruction* int32_parameter_;
 };
 
 //
@@ -104,6 +104,10 @@
   EXPECT_FALSE(Alignment(16, 1).IsAlignedAt(16));
   EXPECT_FALSE(Alignment(16, 7).IsAlignedAt(16));
   EXPECT_FALSE(Alignment(16, 0).IsAlignedAt(32));
+
+  EXPECT_EQ(16u, Alignment(16, 0).Base());
+  EXPECT_EQ(0u, Alignment(16, 0).Offset());
+  EXPECT_EQ(4u, Alignment(16, 4).Offset());
 }
 
 TEST(NodesVector, AlignmentEQ) {
@@ -131,21 +135,22 @@
 
 TEST_F(NodesVectorTest, VectorOperationProperties) {
   HVecOperation* v0 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, parameter_, DataType::Type::kInt32, 4);
+      HVecReplicateScalar(&allocator_, int32_parameter_, DataType::Type::kInt32, 4, kNoDexPc);
   HVecOperation* v1 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, parameter_, DataType::Type::kInt32, 4);
+      HVecReplicateScalar(&allocator_, int32_parameter_, DataType::Type::kInt32, 4, kNoDexPc);
   HVecOperation* v2 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, parameter_, DataType::Type::kInt32, 2);
+      HVecReplicateScalar(&allocator_, int32_parameter_, DataType::Type::kInt32, 2, kNoDexPc);
   HVecOperation* v3 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, parameter_, DataType::Type::kInt16, 4);
+      HVecReplicateScalar(&allocator_, int32_parameter_, DataType::Type::kInt16, 4, kNoDexPc);
   HVecOperation* v4 = new (&allocator_) HVecStore(
       &allocator_,
-      parameter_,
-      parameter_,
+      int32_parameter_,
+      int32_parameter_,
       v0,
       DataType::Type::kInt32,
       SideEffects::ArrayWriteOfType(DataType::Type::kInt32),
-      4);
+      4,
+      kNoDexPc);
 
   EXPECT_TRUE(v0->Equals(v0));
   EXPECT_TRUE(v1->Equals(v1));
@@ -194,26 +199,29 @@
 
 TEST_F(NodesVectorTest, VectorAlignmentAndStringCharAtMatterOnLoad) {
   HVecLoad* v0 = new (&allocator_) HVecLoad(&allocator_,
-                                            parameter_,
-                                            parameter_,
+                                            int32_parameter_,
+                                            int32_parameter_,
                                             DataType::Type::kInt32,
                                             SideEffects::ArrayReadOfType(DataType::Type::kInt32),
                                             4,
-                                            /*is_string_char_at*/ false);
+                                            /*is_string_char_at*/ false,
+                                            kNoDexPc);
   HVecLoad* v1 = new (&allocator_) HVecLoad(&allocator_,
-                                            parameter_,
-                                            parameter_,
+                                            int32_parameter_,
+                                            int32_parameter_,
                                             DataType::Type::kInt32,
                                             SideEffects::ArrayReadOfType(DataType::Type::kInt32),
                                             4,
-                                            /*is_string_char_at*/ false);
+                                            /*is_string_char_at*/ false,
+                                            kNoDexPc);
   HVecLoad* v2 = new (&allocator_) HVecLoad(&allocator_,
-                                            parameter_,
-                                            parameter_,
+                                            int32_parameter_,
+                                            int32_parameter_,
                                             DataType::Type::kInt32,
                                             SideEffects::ArrayReadOfType(DataType::Type::kInt32),
                                             4,
-                                            /*is_string_char_at*/ true);
+                                            /*is_string_char_at*/ true,
+                                            kNoDexPc);
 
   EXPECT_TRUE(v0->CanBeMoved());
   EXPECT_TRUE(v1->CanBeMoved());
@@ -228,7 +236,7 @@
   EXPECT_TRUE(v2->Equals(v2));
 
   EXPECT_TRUE(v0->Equals(v1));
-  EXPECT_FALSE(v0->Equals(v2));
+  EXPECT_FALSE(v0->Equals(v2));  // different is_string_char_at
 
   EXPECT_TRUE(v0->GetAlignment() == Alignment(4, 0));
   EXPECT_TRUE(v1->GetAlignment() == Alignment(4, 0));
@@ -241,24 +249,65 @@
   EXPECT_FALSE(v0->Equals(v1));  // no longer equal
 }
 
+TEST_F(NodesVectorTest, VectorAlignmentMattersOnStore) {
+  HVecOperation* p0 = new (&allocator_)
+      HVecReplicateScalar(&allocator_, int32_parameter_, DataType::Type::kInt32, 4, kNoDexPc);
+  HVecStore* v0 = new (&allocator_) HVecStore(
+      &allocator_,
+      int32_parameter_,
+      int32_parameter_,
+      p0,
+      DataType::Type::kInt32,
+      SideEffects::ArrayWriteOfType(DataType::Type::kInt32),
+      4,
+      kNoDexPc);
+  HVecStore* v1 = new (&allocator_) HVecStore(
+      &allocator_,
+      int32_parameter_,
+      int32_parameter_,
+      p0,
+      DataType::Type::kInt32,
+      SideEffects::ArrayWriteOfType(DataType::Type::kInt32),
+      4,
+      kNoDexPc);
+
+  EXPECT_FALSE(v0->CanBeMoved());
+  EXPECT_FALSE(v1->CanBeMoved());
+
+  EXPECT_TRUE(v0->Equals(v1));
+
+  EXPECT_TRUE(v0->GetAlignment() == Alignment(4, 0));
+  EXPECT_TRUE(v1->GetAlignment() == Alignment(4, 0));
+
+  v1->SetAlignment(Alignment(8, 0));
+
+  EXPECT_TRUE(v1->GetAlignment() == Alignment(8, 0));
+
+  EXPECT_FALSE(v0->Equals(v1));  // no longer equal
+}
+
 TEST_F(NodesVectorTest, VectorSignMattersOnMin) {
   HVecOperation* p0 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, parameter_, DataType::Type::kInt32, 4);
+      HVecReplicateScalar(&allocator_, int32_parameter_, DataType::Type::kInt32, 4, kNoDexPc);
   HVecOperation* p1 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, int8_parameter_, DataType::Type::kInt8, 4);
+      HVecReplicateScalar(&allocator_, int8_parameter_, DataType::Type::kInt8, 4, kNoDexPc);
   HVecOperation* p2 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, int16_parameter_, DataType::Type::kInt16, 4);
+      HVecReplicateScalar(&allocator_, int16_parameter_, DataType::Type::kInt16, 4, kNoDexPc);
 
   HVecMin* v0 = new (&allocator_) HVecMin(
-      &allocator_, p0, p0, DataType::Type::kInt32, 4, /*is_unsigned*/ true);
+      &allocator_, p0, p0, DataType::Type::kInt32, 4, /*is_unsigned*/ true, kNoDexPc);
   HVecMin* v1 = new (&allocator_) HVecMin(
-      &allocator_, p0, p0, DataType::Type::kInt32, 4, /*is_unsigned*/ false);
+      &allocator_, p0, p0, DataType::Type::kInt32, 4, /*is_unsigned*/ false, kNoDexPc);
   HVecMin* v2 = new (&allocator_) HVecMin(
-      &allocator_, p0, p0, DataType::Type::kInt32, 2, /*is_unsigned*/ true);
-  HVecMin* v3 = new (&allocator_) HVecMin(&allocator_, p1, p1, DataType::Type::kUint8, 16);
-  HVecMin* v4 = new (&allocator_) HVecMin(&allocator_, p1, p1, DataType::Type::kInt8, 16);
-  HVecMin* v5 = new (&allocator_) HVecMin(&allocator_, p2, p2, DataType::Type::kUint16, 8);
-  HVecMin* v6 = new (&allocator_) HVecMin(&allocator_, p2, p2, DataType::Type::kInt16, 8);
+      &allocator_, p0, p0, DataType::Type::kInt32, 2, /*is_unsigned*/ true, kNoDexPc);
+  HVecMin* v3 = new (&allocator_) HVecMin(
+      &allocator_, p1, p1, DataType::Type::kUint8, 16, /*is_unsigned*/ false, kNoDexPc);
+  HVecMin* v4 = new (&allocator_) HVecMin(
+      &allocator_, p1, p1, DataType::Type::kInt8, 16, /*is_unsigned*/ false, kNoDexPc);
+  HVecMin* v5 = new (&allocator_) HVecMin(
+      &allocator_, p2, p2, DataType::Type::kUint16, 8, /*is_unsigned*/ false, kNoDexPc);
+  HVecMin* v6 = new (&allocator_) HVecMin(
+      &allocator_, p2, p2, DataType::Type::kInt16, 8, /*is_unsigned*/ false, kNoDexPc);
   HVecMin* min_insns[] = { v0, v1, v2, v3, v4, v5, v6 };
 
   EXPECT_FALSE(p0->CanBeMoved());
@@ -283,22 +332,26 @@
 
 TEST_F(NodesVectorTest, VectorSignMattersOnMax) {
   HVecOperation* p0 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, parameter_, DataType::Type::kInt32, 4);
+      HVecReplicateScalar(&allocator_, int32_parameter_, DataType::Type::kInt32, 4, kNoDexPc);
   HVecOperation* p1 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, int8_parameter_, DataType::Type::kInt8, 4);
+      HVecReplicateScalar(&allocator_, int8_parameter_, DataType::Type::kInt8, 4, kNoDexPc);
   HVecOperation* p2 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, int16_parameter_, DataType::Type::kInt16, 4);
+      HVecReplicateScalar(&allocator_, int16_parameter_, DataType::Type::kInt16, 4, kNoDexPc);
 
   HVecMax* v0 = new (&allocator_) HVecMax(
-      &allocator_, p0, p0, DataType::Type::kInt32, 4, /*is_unsigned*/ true);
+      &allocator_, p0, p0, DataType::Type::kInt32, 4, /*is_unsigned*/ true, kNoDexPc);
   HVecMax* v1 = new (&allocator_) HVecMax(
-      &allocator_, p0, p0, DataType::Type::kInt32, 4, /*is_unsigned*/ false);
+      &allocator_, p0, p0, DataType::Type::kInt32, 4, /*is_unsigned*/ false, kNoDexPc);
   HVecMax* v2 = new (&allocator_) HVecMax(
-      &allocator_, p0, p0, DataType::Type::kInt32, 2, /*is_unsigned*/ true);
-  HVecMax* v3 = new (&allocator_) HVecMax(&allocator_, p1, p1, DataType::Type::kUint8, 16);
-  HVecMax* v4 = new (&allocator_) HVecMax(&allocator_, p1, p1, DataType::Type::kInt8, 16);
-  HVecMax* v5 = new (&allocator_) HVecMax(&allocator_, p2, p2, DataType::Type::kUint16, 8);
-  HVecMax* v6 = new (&allocator_) HVecMax(&allocator_, p2, p2, DataType::Type::kInt16, 8);
+      &allocator_, p0, p0, DataType::Type::kInt32, 2, /*is_unsigned*/ true, kNoDexPc);
+  HVecMax* v3 = new (&allocator_) HVecMax(
+      &allocator_, p1, p1, DataType::Type::kUint8, 16, /*is_unsigned*/ false, kNoDexPc);
+  HVecMax* v4 = new (&allocator_) HVecMax(
+      &allocator_, p1, p1, DataType::Type::kInt8, 16, /*is_unsigned*/ false, kNoDexPc);
+  HVecMax* v5 = new (&allocator_) HVecMax(
+      &allocator_, p2, p2, DataType::Type::kUint16, 8, /*is_unsigned*/ false, kNoDexPc);
+  HVecMax* v6 = new (&allocator_) HVecMax(
+      &allocator_, p2, p2, DataType::Type::kInt16, 8, /*is_unsigned*/ false, kNoDexPc);
   HVecMax* max_insns[] = { v0, v1, v2, v3, v4, v5, v6 };
 
   EXPECT_FALSE(p0->CanBeMoved());
@@ -323,38 +376,51 @@
 
 TEST_F(NodesVectorTest, VectorAttributesMatterOnHalvingAdd) {
   HVecOperation* p0 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, parameter_, DataType::Type::kInt32, 4);
+      HVecReplicateScalar(&allocator_, int32_parameter_, DataType::Type::kInt32, 4, kNoDexPc);
   HVecOperation* p1 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, int8_parameter_, DataType::Type::kInt8, 4);
+      HVecReplicateScalar(&allocator_, int8_parameter_, DataType::Type::kInt8, 4, kNoDexPc);
   HVecOperation* p2 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, int16_parameter_, DataType::Type::kInt16, 4);
+      HVecReplicateScalar(&allocator_, int16_parameter_, DataType::Type::kInt16, 4, kNoDexPc);
 
   HVecHalvingAdd* v0 = new (&allocator_) HVecHalvingAdd(
-      &allocator_, p0, p0, DataType::Type::kInt32, 4, /*is_rounded*/ true, /*is_unsigned*/ true);
+      &allocator_, p0, p0, DataType::Type::kInt32, 4,
+      /*is_rounded*/ true, /*is_unsigned*/ true, kNoDexPc);
   HVecHalvingAdd* v1 = new (&allocator_) HVecHalvingAdd(
-      &allocator_, p0, p0, DataType::Type::kInt32, 4, /*is_rounded*/ false, /*is_unsigned*/ true);
+      &allocator_, p0, p0, DataType::Type::kInt32, 4,
+      /*is_rounded*/ false, /*is_unsigned*/ true, kNoDexPc);
   HVecHalvingAdd* v2 = new (&allocator_) HVecHalvingAdd(
-      &allocator_, p0, p0, DataType::Type::kInt32, 4, /*is_rounded*/ true, /*is_unsigned*/ false);
+      &allocator_, p0, p0, DataType::Type::kInt32, 4,
+      /*is_rounded*/ true, /*is_unsigned*/ false, kNoDexPc);
   HVecHalvingAdd* v3 = new (&allocator_) HVecHalvingAdd(
-      &allocator_, p0, p0, DataType::Type::kInt32, 4, /*is_rounded*/ false, /*is_unsigned*/ false);
+      &allocator_, p0, p0, DataType::Type::kInt32, 4,
+      /*is_rounded*/ false, /*is_unsigned*/ false, kNoDexPc);
   HVecHalvingAdd* v4 = new (&allocator_) HVecHalvingAdd(
-      &allocator_, p0, p0, DataType::Type::kInt32, 2, /*is_rounded*/ true, /*is_unsigned*/ true);
+      &allocator_, p0, p0, DataType::Type::kInt32, 2,
+      /*is_rounded*/ true, /*is_unsigned*/ true, kNoDexPc);
   HVecHalvingAdd* v5 = new (&allocator_) HVecHalvingAdd(
-      &allocator_, p1, p1, DataType::Type::kUint8, 16, /*is_rounded*/ true);
+      &allocator_, p1, p1, DataType::Type::kUint8, 16,
+      /*is_rounded*/ true, /*is_unsigned*/ false, kNoDexPc);
   HVecHalvingAdd* v6 = new (&allocator_) HVecHalvingAdd(
-      &allocator_, p1, p1, DataType::Type::kUint8, 16, /*is_rounded*/ false);
+      &allocator_, p1, p1, DataType::Type::kUint8, 16,
+      /*is_rounded*/ false, /*is_unsigned*/ false, kNoDexPc);
   HVecHalvingAdd* v7 = new (&allocator_) HVecHalvingAdd(
-      &allocator_, p1, p1, DataType::Type::kInt8, 16, /*is_rounded*/ true);
+      &allocator_, p1, p1, DataType::Type::kInt8, 16,
+      /*is_rounded*/ true, /*is_unsigned*/ false, kNoDexPc);
   HVecHalvingAdd* v8 = new (&allocator_) HVecHalvingAdd(
-      &allocator_, p1, p1, DataType::Type::kInt8, 16, /*is_rounded*/ false);
+      &allocator_, p1, p1, DataType::Type::kInt8, 16,
+      /*is_rounded*/ false, /*is_unsigned*/ false, kNoDexPc);
   HVecHalvingAdd* v9 = new (&allocator_) HVecHalvingAdd(
-      &allocator_, p2, p2, DataType::Type::kUint16, 8, /*is_rounded*/ true);
+      &allocator_, p2, p2, DataType::Type::kUint16, 8,
+      /*is_rounded*/ true, /*is_unsigned*/ false, kNoDexPc);
   HVecHalvingAdd* v10 = new (&allocator_) HVecHalvingAdd(
-      &allocator_, p2, p2, DataType::Type::kUint16, 8, /*is_rounded*/ false);
+      &allocator_, p2, p2, DataType::Type::kUint16, 8,
+      /*is_rounded*/ false, /*is_unsigned*/ false, kNoDexPc);
   HVecHalvingAdd* v11 = new (&allocator_) HVecHalvingAdd(
-      &allocator_, p2, p2, DataType::Type::kInt16, 2, /*is_rounded*/ true);
+      &allocator_, p2, p2, DataType::Type::kInt16, 2,
+      /*is_rounded*/ true, /*is_unsigned*/ false, kNoDexPc);
   HVecHalvingAdd* v12 = new (&allocator_) HVecHalvingAdd(
-      &allocator_, p2, p2, DataType::Type::kInt16, 2, /*is_rounded*/ false);
+      &allocator_, p2, p2, DataType::Type::kInt16, 2,
+      /*is_rounded*/ false, /*is_unsigned*/ false, kNoDexPc);
   HVecHalvingAdd* hadd_insns[] = { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12 };
 
   EXPECT_FALSE(p0->CanBeMoved());
@@ -395,14 +461,14 @@
 
 TEST_F(NodesVectorTest, VectorOperationMattersOnMultiplyAccumulate) {
   HVecOperation* v0 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, parameter_, DataType::Type::kInt32, 4);
+      HVecReplicateScalar(&allocator_, int32_parameter_, DataType::Type::kInt32, 4, kNoDexPc);
 
   HVecMultiplyAccumulate* v1 = new (&allocator_) HVecMultiplyAccumulate(
-      &allocator_, HInstruction::kAdd, v0, v0, v0, DataType::Type::kInt32, 4);
+      &allocator_, HInstruction::kAdd, v0, v0, v0, DataType::Type::kInt32, 4, kNoDexPc);
   HVecMultiplyAccumulate* v2 = new (&allocator_) HVecMultiplyAccumulate(
-      &allocator_, HInstruction::kSub, v0, v0, v0, DataType::Type::kInt32, 4);
+      &allocator_, HInstruction::kSub, v0, v0, v0, DataType::Type::kInt32, 4, kNoDexPc);
   HVecMultiplyAccumulate* v3 = new (&allocator_) HVecMultiplyAccumulate(
-      &allocator_, HInstruction::kAdd, v0, v0, v0, DataType::Type::kInt32, 2);
+      &allocator_, HInstruction::kAdd, v0, v0, v0, DataType::Type::kInt32, 2, kNoDexPc);
 
   EXPECT_FALSE(v0->CanBeMoved());
   EXPECT_TRUE(v1->CanBeMoved());
@@ -423,14 +489,14 @@
 
 TEST_F(NodesVectorTest, VectorKindMattersOnReduce) {
   HVecOperation* v0 = new (&allocator_)
-      HVecReplicateScalar(&allocator_, parameter_, DataType::Type::kInt32, 4);
+      HVecReplicateScalar(&allocator_, int32_parameter_, DataType::Type::kInt32, 4, kNoDexPc);
 
   HVecReduce* v1 = new (&allocator_) HVecReduce(
-      &allocator_, v0, DataType::Type::kInt32, 4, HVecReduce::kSum);
+      &allocator_, v0, DataType::Type::kInt32, 4, HVecReduce::kSum, kNoDexPc);
   HVecReduce* v2 = new (&allocator_) HVecReduce(
-      &allocator_, v0, DataType::Type::kInt32, 4, HVecReduce::kMin);
+      &allocator_, v0, DataType::Type::kInt32, 4, HVecReduce::kMin, kNoDexPc);
   HVecReduce* v3 = new (&allocator_) HVecReduce(
-      &allocator_, v0, DataType::Type::kInt32, 4, HVecReduce::kMax);
+      &allocator_, v0, DataType::Type::kInt32, 4, HVecReduce::kMax, kNoDexPc);
 
   EXPECT_FALSE(v0->CanBeMoved());
   EXPECT_TRUE(v1->CanBeMoved());