And the generated bitcodes are different: The first one contains vectorization, but not the second one.
I wonder why this happens, and which passes have been applied to these generated bitcodes?
Thanks in advance.
-save-temps emits the code at different times in the pipeline. The IR (.bc) file is the output of clang before any middle-end optimizations run. -emit-llvm runs all the middle-end optimizations but not the backend.
-O3 -emit-llvm -Xclang -disable-llvm-optzns is similar to the save-temps results but I would usually recommend the former (for some weird reasons I don’t recall).