@@ -134,9 +134,7 @@ class OverflowingBinaryOperator : public Operator {
134134 }
135135 static bool classof (const ConstantExpr *CE) {
136136 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;
140138 }
141139 static bool classof (const Value *V) {
142140 return (isa<Instruction>(V) && classof (cast<Instruction>(V))) ||
@@ -150,7 +148,7 @@ struct OperandTraits<OverflowingBinaryOperator>
150148
151149DEFINE_TRANSPARENT_OPERAND_ACCESSORS (OverflowingBinaryOperator, Value)
152150
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",
154152// / indicating that no bits are destroyed.
155153class PossiblyExactOperator : public Operator {
156154public:
@@ -182,15 +180,11 @@ class PossiblyExactOperator : public Operator {
182180 OpC == Instruction::LShr;
183181 }
184182
185- static bool classof (const ConstantExpr *CE) {
186- return isPossiblyExactOpcode (CE->getOpcode ());
187- }
188183 static bool classof (const Instruction *I) {
189184 return isPossiblyExactOpcode (I->getOpcode ());
190185 }
191186 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)));
194188 }
195189};
196190
0 commit comments