Fix Transforms/GlobalOpt/2007-04-05-Crash.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35689 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-04-05 21:09:42 +00:00
parent 65fe9124e3
commit 4913bf47fd

View File

@ -1347,7 +1347,7 @@ bool GlobalOpt::ProcessInternalGlobal(GlobalVariable *GV,
if (GV->getType()->getElementType() != Type::Int1Ty &&
!GV->getType()->getElementType()->isFloatingPoint() &&
!isa<VectorType>(GV->getType()->getElementType()) &&
!GS.HasPHIUser) {
!GS.HasPHIUser && !GS.isNotSuitableForSRA) {
DOUT << " *** SHRINKING TO BOOL: " << *GV;
ShrinkGlobalToBoolean(GV, SOVConstant);
++NumShrunkToBool;