OPT error in optimizing the steps for the machine format.

Hi, I’m doing the optimization of each of the steps manually, with the opt command, but when I get to the machine optimization steps, an error occurs and for the optimization sequence, some flag will be missing for this step of optimizing the steps of machine??
The command executed by me is: "opt -mtriple = x86_64-unknown-linux -march = x86 -mcpu = core-avx2 -mem2reg -targetpassconfig -S codes / test_-assumption-cache-tracker_263.ll -o codes / test_- targetpassconfig_264.ll "

And the error generated is: “LLVM ERROR: Trying to construct TargetPassConfig without a target machine. Scheduling a CodeGen pass without a target triple set?”

Is there any command to continue optimizing machine steps?

Thank you.