[all-commits] [llvm/llvm-project] 324d64: [InstCombine] Enhance deduction of alignment for a...

Dávid Bolvanský via All-commits all-commits at lists.llvm.org
Mon Apr 19 17:04:47 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 324d641b75b54a8772c3c9a881eedad62dc5518c
      https://github.com/llvm/llvm-project/commit/324d641b75b54a8772c3c9a881eedad62dc5518c
  Author: Dávid Bolvanský <david.bolvansky at gmail.com>
  Date:   2021-04-20 (Tue, 20 Apr 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
    M llvm/test/Transforms/InstCombine/deref-alloc-fns.ll

  Log Message:
  -----------
  [InstCombine] Enhance deduction of alignment for aligned_alloc

This patch improves https://reviews.llvm.org/D76971 (Deduce attributes for aligned_alloc in InstCombine) and implements "TODO" item mentioned in the review of that patch.

> The function aligned_alloc() is the same as memalign(), except for the added restriction that size should be a multiple of alignment.

Currently, we simply bail out if we see a non-constant size - change that.

Reviewed By: jdoerfert

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




More information about the All-commits mailing list