CE->getOperand(0)->getType(), CE->getType(),
*DL))
return findValueImpl(CE->getOperand(0), OffsetOk, Visited);
- } else if (CE->getOpcode() == Instruction::ExtractValue) {
- ArrayRef<unsigned> Indices = CE->getIndices();
- if (Value *W = FindInsertedValue(CE->getOperand(0), Indices))
- if (W != V)
- return findValueImpl(W, OffsetOk, Visited);
}
}
Record.push_back(VE.getValueID(C->getOperand(1)));
Record.push_back(CE->getPredicate());
break;
- case Instruction::ExtractValue:
case Instruction::InsertValue:
- report_fatal_error("extractvalue/insertvalue constexprs not supported");
+ report_fatal_error("insertvalue constexprs not supported");
break;
}
} else if (const BlockAddress *BA = dyn_cast<BlockAddress>(C)) {
DAG.getVTList(AggValueVTs), Values));
}
-void SelectionDAGBuilder::visitExtractValue(const User &I) {
- ArrayRef<unsigned> Indices;
- if (const ExtractValueInst *EV = dyn_cast<ExtractValueInst>(&I))
- Indices = EV->getIndices();
- else
- Indices = cast<ConstantExpr>(&I)->getIndices();
-
+void SelectionDAGBuilder::visitExtractValue(const ExtractValueInst &I) {
+ ArrayRef<unsigned> Indices = I.getIndices();
const Value *Op0 = I.getOperand(0);
Type *AggTy = Op0->getType();
Type *ValTy = I.getType();
void visitInsertElement(const User &I);
void visitShuffleVector(const User &I);
- void visitExtractValue(const User &I);
+ void visitExtractValue(const ExtractValueInst &I);
void visitInsertValue(const User &I);
void visitLandingPad(const LandingPadInst &LP);
// ShuffleVector
return Builder.CreateShuffleVector(NewOperands[0], NewOperands[1],
NewOperands[2]);
- case Instruction::ExtractValue:
- // ExtractValueConstantExpr
- return Builder.CreateExtractValue(NewOperands[0], C->getIndices());
case Instruction::InsertValue:
// InsertValueConstantExpr
return Builder.CreateInsertValue(NewOperands[0], NewOperands[1],