From b372aaa2b4ea87df98c47815c89d0f194a909971 Mon Sep 17 00:00:00 2001 From: Jonas Paulsson Date: Mon, 9 Sep 2019 07:58:57 +0000 Subject: [PATCH] [SystemZ] NFC: use clearRegisterDeads() in SystemZElimCompare.cpp This is simpler than using findRegisterDefOperandIdx() + setIsDead(). Review: Ulrich Weigand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371369 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/SystemZ/SystemZElimCompare.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/Target/SystemZ/SystemZElimCompare.cpp b/lib/Target/SystemZ/SystemZElimCompare.cpp index 36babf02992..946eb2ba7c7 100644 --- a/lib/Target/SystemZ/SystemZElimCompare.cpp +++ b/lib/Target/SystemZ/SystemZElimCompare.cpp @@ -378,11 +378,8 @@ bool SystemZElimCompare::adjustCCMasksForInstr( } // CC is now live after MI. - if (!ConvOpc) { - int CCDef = MI.findRegisterDefOperandIdx(SystemZ::CC, false, true, TRI); - assert(CCDef >= 0 && "Couldn't find CC set"); - MI.getOperand(CCDef).setIsDead(false); - } + if (!ConvOpc) + MI.clearRegisterDeads(SystemZ::CC); // Check if MI lies before Compare. bool BeforeCmp = false; -- 2.50.1