[GlobalOpt] Fix the assert for null check of global value
authorShimin Cui <scui@ca.ibm.com>
Wed, 25 Aug 2021 00:47:33 +0000 (20:47 -0400)
committerShimin Cui <scui@ca.ibm.com>
Wed, 25 Aug 2021 00:47:33 +0000 (20:47 -0400)
commitcea5ab090b5e4e8ee06a9230b73e74c1230c1c54
treee67dfb4bf94bcd04a154dfefb414f15aa558fabc
parent2b2c13e672bdbf812b8bb47f0575e534b3c9c8c6
[GlobalOpt] Fix the assert for null check of global value

This is to fix the reported assert - https://bugs.llvm.org/show_bug.cgi?id=51608.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D108674
llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/test/Transforms/GlobalOpt/null-check-global-value.ll [new file with mode: 0644]