[InstCombine] Make foldOpWithConstantIntoOperand take a BinaryOperator instead of a generic Instruction.
It blindly assumes there are two operands so make it explicit. llvm-svn: 299351
This commit is contained in:
parent
af940ae280
commit
d0b053d229
|
@ -571,7 +571,7 @@ private:
|
|||
Instruction *FoldOpIntoSelect(Instruction &Op, SelectInst *SI);
|
||||
|
||||
/// This is a convenience wrapper function for the above two functions.
|
||||
Instruction *foldOpWithConstantIntoOperand(Instruction &I);
|
||||
Instruction *foldOpWithConstantIntoOperand(BinaryOperator &I);
|
||||
|
||||
/// \brief Try to rotate an operation below a PHI node, using PHI nodes for
|
||||
/// its operands.
|
||||
|
|
|
@ -967,7 +967,7 @@ Instruction *InstCombiner::FoldOpIntoPhi(Instruction &I) {
|
|||
return replaceInstUsesWith(I, NewPN);
|
||||
}
|
||||
|
||||
Instruction *InstCombiner::foldOpWithConstantIntoOperand(Instruction &I) {
|
||||
Instruction *InstCombiner::foldOpWithConstantIntoOperand(BinaryOperator &I) {
|
||||
assert(isa<Constant>(I.getOperand(1)) && "Unexpected operand type");
|
||||
|
||||
if (auto *Sel = dyn_cast<SelectInst>(I.getOperand(0))) {
|
||||
|
|
Loading…
Reference in New Issue