[all-commits] [llvm/llvm-project] 3d475d: [Mem2Reg] Consistently preserve nonnull assume for...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jul 12 03:53:23 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d475dfeb990df5c112535ecc4ec6ffc8f18d4b1
      https://github.com/llvm/llvm-project/commit/3d475dfeb990df5c112535ecc4ec6ffc8f18d4b1
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-07-12 (Tue, 12 Jul 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
    M llvm/test/Transforms/Mem2Reg/preserve-nonnull-load-metadata.ll

  Log Message:
  -----------
  [Mem2Reg] Consistently preserve nonnull assume for uninit load

When performing a !nonnull load from uninitialized memory, we
should preserve the nonnull assume just like in all other cases.
We already do this correctly in the generic mem2reg code, but
don't handle this case when using the optimized single-block
implementation.

Make sure that the optimized implementation exhibits the same
behavior as the generic implementation.




More information about the All-commits mailing list