message: Correct axis check
diff: @@ -1028,9 +1028,13 @@ static LogicalResult Verify(PackOp op) {
  // Check axis bounds.
  if (input_type.hasRank()) {
  int64_t axis_value = op.axis().getSExtValue();
  - if (abs(axis_value) > input_type.getRank())
  - return op.emitOpError("op attribute 'axis' is out of bounds, got ")
  - << axis_value;
  + if (axis_value < 0)
  + axis_value += input_type.getRank() + 1;
  + if (axis_value < 0 || axis_value >= input_type.getRank() + 1)
  + return op.emitOpError()
  + << "op attribute 'axis' should be in range [-rank - 1, rank + 1), "
  + << "got rank = " << input_type.getRank()
  + << ", and axis = " << op.axis().getSExtValue();
  }
  // Make sure all inputs have the same shape and element type.
  