1. A non-transitory computer-readable storage medium storing a computer program, the computer program causing a computer to perform a process comprising: copying a branch instruction included in first code to produce a plurality of branch instructions; generating a control instruction to cause different threads running on a processor to execute different branch instructions of the plurality of branch instructions, the processor being able to execute a plurality of threads that share storage space for storing information to be used for branch prediction; and generating second code including the plurality of branch instructions and the control instruction.