[all-commits] [llvm/llvm-project] e6241c: [Mem2Reg] Only convert !nonnull to assume if !noun...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Jan 20 07:38:42 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e6241cbdcbf3cc9beb49460578466e18936ef220
      https://github.com/llvm/llvm-project/commit/e6241cbdcbf3cc9beb49460578466e18936ef220
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-01-20 (Fri, 20 Jan 2023)

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

  Log Message:
  -----------
  [Mem2Reg] Only convert !nonnull to assume if !noundef present

After D141386 !nonnull violation returns poison rather than
resulting in immediate undefined behavior. However, converting
it into an assume would result in IUB. As such, we can only
perform this transform if !noundef is also present.




More information about the All-commits mailing list