[all-commits] [llvm/llvm-project] 808286: [Alignment][NFC] Assume AlignmentFromAssumptions::...

Guillaume Chatelet via All-commits all-commits at lists.llvm.org
Mon Apr 6 07:55:08 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 808286342a6f1c132a655e8dc2477bfb01ecb63a
      https://github.com/llvm/llvm-project/commit/808286342a6f1c132a655e8dc2477bfb01ecb63a
  Author: Guillaume Chatelet <gchatelet at google.com>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp

  Log Message:
  -----------
  [Alignment][NFC] Assume AlignmentFromAssumptions::getNewAlignment is always set.

Summary:
In D77454 we explain that `LoadInst` and `StoreInst` always have their alignment defined.
This allows to work backward here and to infer that `getNewAlignment` does not need to return `0` in case of failure.
Returning `1` also works since it needs to be greater than the Load/Store alignment which is a least `1`.

This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77538




More information about the All-commits mailing list