LLVM: avoid redundant arithmetic when mapping statement index
add "scalarrepl" LLVM optimization