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

Shoaib Meenai via All-commits all-commits at lists.llvm.org
Wed Oct 13 15:35:23 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6404f4b5af39840a2dad27abc3924eb3846ae8a4
      https://github.com/llvm/llvm-project/commit/6404f4b5af39840a2dad27abc3924eb3846ae8a4
  Author: Shoaib Meenai <smeenai at fb.com>
  Date:   2021-10-13 (Wed, 13 Oct 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M 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




More information about the All-commits mailing list