[llvm] r335131 - [llvm-mca] use APint::operator[] to obtain the bit value. NFC
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 20 07:30:17 PDT 2018
Author: adibiagio
Date: Wed Jun 20 07:30:17 2018
New Revision: 335131
URL: http://llvm.org/viewvc/llvm-project?rev=335131&view=rev
Log:
[llvm-mca] use APint::operator[] to obtain the bit value. NFC
Modified:
llvm/trunk/tools/llvm-mca/InstrBuilder.cpp
Modified: llvm/trunk/tools/llvm-mca/InstrBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/InstrBuilder.cpp?rev=335131&r1=335130&r2=335131&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/InstrBuilder.cpp (original)
+++ llvm/trunk/tools/llvm-mca/InstrBuilder.cpp Wed Jun 20 07:30:17 2018
@@ -495,10 +495,8 @@ InstrBuilder::createInstruction(const MC
}
assert(RegID && "Expected a valid register ID!");
- APInt CurrWriteMask = WriteMask & (1 << WriteIndex);
- bool UpdatesSuperRegisters = CurrWriteMask.getBoolValue();
- NewIS->getDefs().emplace_back(
- llvm::make_unique<WriteState>(WD, RegID, UpdatesSuperRegisters));
+ NewIS->getDefs().emplace_back(llvm::make_unique<WriteState>(
+ WD, RegID, /* ClearsSuperRegs */ WriteMask[WriteIndex]));
++WriteIndex;
}
More information about the llvm-commits
mailing list