[llvm-commits] [PATCH] LICM: Do not loose alignment on promotion

Eli Friedman eli.friedman at gmail.com
Wed Jul 6 11:24:43 PDT 2011


On Wed, Jul 6, 2011 at 9:39 AM, Tobias Grosser <tobias at grosser.es> wrote:
>
> The promotion code lost any alignment information, when hoisting loads and
> stores out of the loop. This lead to incorrect aligned memory accesses. We now
> use the largest alignment we can prove to be correct.
> ---
>
>  lib/Transforms/Scalar/LICM.cpp               |   38 ++++++++++++++++++++-----
>  test/Transforms/LICM/2011-07-06-Alignment.ll |   26 +++++++++++++++++
>  2 files changed, 56 insertions(+), 8 deletions(-)
>  create mode 100644 test/Transforms/LICM/2011-07-06-Alignment.ll
>
> OK to commit?

Looks like your patch has tabs; please remove.

Otherwise, looks fine; although, since I touched that code pretty
recently, I'm surprised I didn't spot that issue.

-Eli




More information about the llvm-commits mailing list