Skip to content

Commit 03110dd

Browse files
committed
[IR] Remove ZExtOperator (NFC)
Now that zext constant expressions are no longer supported, ZExtInst should be used instead.
1 parent 6e4692c commit 03110dd

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

llvm/include/llvm/IR/Operator.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,6 @@ class LShrOperator
367367
: public ConcreteOperator<PossiblyExactOperator, Instruction::LShr> {
368368
};
369369

370-
class ZExtOperator : public ConcreteOperator<Operator, Instruction::ZExt> {};
371-
372370
class GEPOperator
373371
: public ConcreteOperator<Operator, Instruction::GetElementPtr> {
374372
friend class GetElementPtrInst;

llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5574,8 +5574,8 @@ Instruction *InstCombinerImpl::foldICmpWithZextOrSext(ICmpInst &ICmp) {
55745574
// icmp Pred (ext X), (ext Y)
55755575
Value *Y;
55765576
if (match(ICmp.getOperand(1), m_ZExtOrSExt(m_Value(Y)))) {
5577-
bool IsZext0 = isa<ZExtOperator>(ICmp.getOperand(0));
5578-
bool IsZext1 = isa<ZExtOperator>(ICmp.getOperand(1));
5577+
bool IsZext0 = isa<ZExtInst>(ICmp.getOperand(0));
5578+
bool IsZext1 = isa<ZExtInst>(ICmp.getOperand(1));
55795579

55805580
if (IsZext0 != IsZext1) {
55815581
// If X and Y and both i1
@@ -5834,8 +5834,8 @@ static Instruction *processUMulZExtIdiom(ICmpInst &I, Value *MulVal,
58345834
return nullptr;
58355835
assert(MulInstr->getOpcode() == Instruction::Mul);
58365836

5837-
auto *LHS = cast<ZExtOperator>(MulInstr->getOperand(0)),
5838-
*RHS = cast<ZExtOperator>(MulInstr->getOperand(1));
5837+
auto *LHS = cast<ZExtInst>(MulInstr->getOperand(0)),
5838+
*RHS = cast<ZExtInst>(MulInstr->getOperand(1));
58395839
assert(LHS->getOpcode() == Instruction::ZExt);
58405840
assert(RHS->getOpcode() == Instruction::ZExt);
58415841
Value *A = LHS->getOperand(0), *B = RHS->getOperand(0);

llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ InstCombinerImpl::foldBinOpOfSelectAndCastOfSelectCondition(BinaryOperator &I) {
916916

917917
auto NewFoldedConst = [&](bool IsTrueArm, Value *V) {
918918
bool IsCastOpRHS = (CastOp == RHS);
919-
bool IsZExt = isa<ZExtOperator>(CastOp);
919+
bool IsZExt = isa<ZExtInst>(CastOp);
920920
Constant *C;
921921

922922
if (IsTrueArm) {

0 commit comments

Comments
 (0)