[all-commits] [llvm/llvm-project] 12aaa8: [InstCombine] Remove attributes after hoisting fre...

Shoaib Meenai via All-commits all-commits at lists.llvm.org
Fri Jan 7 15:17:13 PST 2022

  Branch: refs/heads/release/13.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 12aaa8553f82dae682e4bad318a67615f39175ae
  Author: Shoaib Meenai <smeenai at fb.com>
  Date:   2022-01-07 (Fri, 07 Jan 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    A llvm/test/Transforms/InstCombine/malloc-free.ll

  Log Message:
  [InstCombine] Remove attributes after hoisting free above null check

If the parameter had been annotated as nonnull because of the null
check, we want to remove the attribute, since it may no longer apply and
could result in miscompiles if left. Similarly, we also want to remove
undef-implying attributes, since they may not apply anymore either.

Fixes PR52110.

Reviewed By: nikic

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

(cherry picked from commit 6404f4b5af39840a2dad27abc3924eb3846ae8a4)

More information about the All-commits mailing list