mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
fix a crash in SCCP handling extractvalue of an array, pointed out and
tracked down by Stephan Reiter! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86726 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -795,9 +795,14 @@ void SCCPSolver::visitExtractValueInst(ExtractValueInst &EVI) {
|
||||
return markOverdefined(&EVI);
|
||||
|
||||
Value *AggVal = EVI.getAggregateOperand();
|
||||
unsigned i = *EVI.idx_begin();
|
||||
LatticeVal EltVal = getStructValueState(AggVal, i);
|
||||
mergeInValue(getValueState(&EVI), &EVI, EltVal);
|
||||
if (isa<StructType>(AggVal->getType())) {
|
||||
unsigned i = *EVI.idx_begin();
|
||||
LatticeVal EltVal = getStructValueState(AggVal, i);
|
||||
mergeInValue(getValueState(&EVI), &EVI, EltVal);
|
||||
} else {
|
||||
// Otherwise, must be extracting from an array.
|
||||
return markOverdefined(&EVI);
|
||||
}
|
||||
}
|
||||
|
||||
void SCCPSolver::visitInsertValueInst(InsertValueInst &IVI) {
|
||||
|
||||
Reference in New Issue
Block a user