[llvm] r371369 - [SystemZ] NFC: use clearRegisterDeads() in SystemZElimCompare.cpp
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 9 00:58:57 PDT 2019
Author: jonpa
Date: Mon Sep 9 00:58:57 2019
New Revision: 371369
URL: http://llvm.org/viewvc/llvm-project?rev=371369&view=rev
Log:
[SystemZ] NFC: use clearRegisterDeads() in SystemZElimCompare.cpp
This is simpler than using findRegisterDefOperandIdx() + setIsDead().
Review: Ulrich Weigand.
Modified:
llvm/trunk/lib/Target/SystemZ/SystemZElimCompare.cpp
Modified: llvm/trunk/lib/Target/SystemZ/SystemZElimCompare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZElimCompare.cpp?rev=371369&r1=371368&r2=371369&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZElimCompare.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZElimCompare.cpp Mon Sep 9 00:58:57 2019
@@ -378,11 +378,8 @@ bool SystemZElimCompare::adjustCCMasksFo
}
// 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;
More information about the llvm-commits
mailing list