Clang++ and opt produce different results

I modified llvm’s source code (in llvm/lib) to add some transformation optimizations. While I confirmed that my changes were reflected by checking the output from opt with a test input, I noticed that the output from using clang++ did not reflect my changes. I am using -O3 in every step, and the target architecture is x86.

Referring to this post I am running the same commands, but I don’t even get the same outputs with -O3.

My goal is to make clang++ also apply the same optimizations as opt does when -O3 is specified. Specifically, the optimization involved is the InstCombine pass. Does clang++ not apply this transformation? and where can I find clang++'s optimization pipeline in the project source?