  Helical magnetic flux rope (MFR) is a fundamental structure of corona mass
ejections (CMEs) and has been discovered recently to exist as a sigmoidal
channel structure prior to its eruption in the extreme ultraviolet (EUV) high
temperature passbands of the Atmospheric Imaging Assembly (AIA). However, when
and where the MFR is built up are still elusive. In this paper, we investigate
two MFRs (MFR1 and MFR2) in detail, whose eruptions produced two energetic
solar flares and CMEs on 2014 April 18 and 2014 September 10, respectively. The
AIA EUV images reveal that for a long time prior to their eruption, both MFR1
and MFR2 are under formation, which is probably through magnetic reconnection
between two groups of sheared arcades driven by the shearing and converging
flows in the photosphere near the polarity inversion line. At the footpoints of
the MFR1, the \textit{Interface Region Imaging Spectrograph} Si IV, C II, and
Mg II lines exhibit weak to moderate redshifts and a non-thermal broadening in
the pre-flare phase. However, a relatively large blueshift and an extremely
strong non-thermal broadening are found at the formation site of the MFR2.
These spectral features consolidate the proposition that the reconnection plays
an important role in the formation of MFRs. For the MFR1, the reconnection
outflow may propagate along its legs, penetrating into the transition region
and the chromosphere at the footpoints. For the MFR2, the reconnection probably
takes place in the lower atmosphere and results in the strong blueshift and
non-thermal broadening for the Mg II, C II, and Si IV lines.
