Skip to content

Commit 6f69f8c

Browse files
committed
[IR] Use Instruction::isBinaryOp to simplify code. NFC
1 parent 267ab1c commit 6f69f8c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/IR/ConstantsContext.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,7 @@ struct ConstantExprKeyType {
491491
default:
492492
if (Instruction::isCast(Opcode))
493493
return new CastConstantExpr(Opcode, Ops[0], Ty);
494-
if ((Opcode >= Instruction::BinaryOpsBegin &&
495-
Opcode < Instruction::BinaryOpsEnd))
494+
if (Instruction::isBinaryOp(Opcode))
496495
return new BinaryConstantExpr(Opcode, Ops[0], Ops[1],
497496
SubclassOptionalData);
498497
llvm_unreachable("Invalid ConstantExpr!");

0 commit comments

Comments
 (0)