[GVN] Also remove phi nodes from VN table (PR65447)
authorNikita Popov <npopov@redhat.com>
Fri, 15 Sep 2023 09:42:59 +0000 (11:42 +0200)
committerTobias Hieta <tobias@hieta.se>
Mon, 25 Sep 2023 11:04:45 +0000 (13:04 +0200)
commit481358974fb0f732e33d503c224492a543f4d7bd
treebab8b603ded7406fae3947032e2bb4098b2f53fc
parent9f77e96186be77a2bd07feb0b83681f452fc967d
[GVN] Also remove phi nodes from VN table (PR65447)

Followup to D158849: We also need to remove the phi node from the
VN table, which is not handled by removeInstruction().

Fixes https://github.com/llvm/llvm-project/issues/65447.

(cherry picked from commit 18e77760ce5e42d9057f69c3e64a8300d01a48ac)
llvm/lib/Transforms/Scalar/GVN.cpp
llvm/test/Transforms/GVN/pr65447.ll [new file with mode: 0644]