@@ -134,9 +134,7 @@ class OverflowingBinaryOperator : public Operator {
134
134
}
135
135
static bool classof (const ConstantExpr *CE) {
136
136
return CE->getOpcode () == Instruction::Add ||
137
- CE->getOpcode () == Instruction::Sub ||
138
- CE->getOpcode () == Instruction::Mul ||
139
- CE->getOpcode () == Instruction::Shl;
137
+ CE->getOpcode () == Instruction::Sub;
140
138
}
141
139
static bool classof (const Value *V) {
142
140
return (isa<Instruction>(V) && classof (cast<Instruction>(V))) ||
@@ -150,7 +148,7 @@ struct OperandTraits<OverflowingBinaryOperator>
150
148
151
149
DEFINE_TRANSPARENT_OPERAND_ACCESSORS (OverflowingBinaryOperator, Value)
152
150
153
- // / A udiv or sdiv instruction, which can be marked as "exact",
151
+ // / A udiv, sdiv, lshr, or ashr instruction, which can be marked as "exact",
154
152
// / indicating that no bits are destroyed.
155
153
class PossiblyExactOperator : public Operator {
156
154
public:
@@ -182,15 +180,11 @@ class PossiblyExactOperator : public Operator {
182
180
OpC == Instruction::LShr;
183
181
}
184
182
185
- static bool classof (const ConstantExpr *CE) {
186
- return isPossiblyExactOpcode (CE->getOpcode ());
187
- }
188
183
static bool classof (const Instruction *I) {
189
184
return isPossiblyExactOpcode (I->getOpcode ());
190
185
}
191
186
static bool classof (const Value *V) {
192
- return (isa<Instruction>(V) && classof (cast<Instruction>(V))) ||
193
- (isa<ConstantExpr>(V) && classof (cast<ConstantExpr>(V)));
187
+ return (isa<Instruction>(V) && classof (cast<Instruction>(V)));
194
188
}
195
189
};
196
190
0 commit comments