A method, computer program product, and information handling system for
generating loop code to execute on Single-Instruction Multiple-Datapath
(SIMD) architectures, where the loop operates on datatypes having
different lengths, is disclosed. Further, a preferred embodiment of the
present invention includes a novel technique to efficiently realign or
shift arbitrary streams to an arbitrary offset, regardless whether the
alignments or offsets are known at the compile time or not. This
technique enables the application of advanced alignment optimizations to
runtime alignment. This allows sequential loop code operating on
datatypes of disparate length to be transformed ("simdized") into
optimized SIMD code through a fully automated process.