LLVMAddPromoteMemoryToRegisterPass(gallivm->passmgr);
#if LLVM_VERSION_MAJOR <= 11
LLVMAddConstantPropagationPass(gallivm->passmgr);
+#else
+ LLVMAddInstructionSimplifyPass(gallivm->passmgr);
#endif
LLVMAddInstructionCombiningPass(gallivm->passmgr);
LLVMAddGVNPass(gallivm->passmgr);