While toying with the preferred loop alignment for AArch64, I noticed the MBP pass had a bad habit of inserting nop instructions into the dynamic instruction stream when aligning blocks. This patch attempts to prevent nops from being added to the dynamic instruction stream by placing additional alignment directives on non-fall through basic blocks.
This is a WIP and I don't plan on pursuing this patch further at this time. However, I figured I would post the patch in case someone else would like to take this on.. AFAIK, PowerPC is the only target that would immediately benefit from this patch. However, if other targets start setting a preferred loop alignment this work becomes much more interesting.
Chad