Skip to content

Commit abcaebf

Browse files
committed
[InstSimplify] Use cast instead of dyn_cast+assert. NFC
1 parent 94189e1 commit abcaebf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Analysis/InstructionSimplify.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3949,8 +3949,7 @@ static Value *simplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
39493949
// Turn icmp (sext X), Cst into a compare of X and Cst if Cst is extended
39503950
// too. If not, then try to deduce the result of the comparison.
39513951
else if (match(RHS, m_ImmConstant())) {
3952-
Constant *C = dyn_cast<Constant>(RHS);
3953-
assert(C != nullptr);
3952+
Constant *C = cast<Constant>(RHS);
39543953

39553954
// Compute the constant that would happen if we truncated to SrcTy then
39563955
// reextended to DstTy.

0 commit comments

Comments
 (0)