[all-commits] [llvm/llvm-project] 074561: [Mem2Reg] Check that load type matches alloca type

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Feb 8 08:16:33 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 074561a4a22f610d756109170285d8626c4cc3bc
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
    A llvm/test/Transforms/Mem2Reg/opaque-ptr.ll

  Log Message:
  [Mem2Reg] Check that load type matches alloca type

Alloca promotion can only deal with cases where the load/store
types match the alloca type (it explicitly does not support
bitcasted load/stores).

With opaque pointers this is no longer enforced through the pointer
type, so add an explicit check.

More information about the All-commits mailing list