No, You can not do the optimization before converting into SSA form. Optimization is a next phase of Intermediate Representation and SSA is a Type of IR which is widely used by various compilers because it makes various types of Optimizations easy like Dead Code Elimination, Constant Propagation etc.
Moreover, the Given Code Code Segment is Already in SSA form, hence, we do not need any extra temporary variable to convert it into SSA.