[MemoryBuiltins] Handle phi nodes without operands (PR63013)
authorNikita Popov <npopov@redhat.com>
Wed, 31 May 2023 08:44:56 +0000 (10:44 +0200)
committerNikita Popov <npopov@redhat.com>
Wed, 31 May 2023 08:47:15 +0000 (10:47 +0200)
commit1379127481c3b26a6000d8d8f98e21fe7946e019
tree14fe2b8635d873ea0bf86be609b97a3d1801bc86
parentb5c7892d54f8d415e3e0198e067886c825f26e0c
[MemoryBuiltins] Handle phi nodes without operands (PR63013)

Conservatively return unknown in this degenerate case. This is
hard to hit in practice, because such phis are usually optimized
away before they reach a getObjectSize() call.

Fixes https://github.com/llvm/llvm-project/issues/63013.
llvm/lib/Analysis/MemoryBuiltins.cpp
llvm/test/Transforms/JumpThreading/pr63013.ll [new file with mode: 0644]