Skip to content

Commit 6edcf23

Browse files
Address comments
1 parent c74d852 commit 6edcf23

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

llvm/include/llvm/IR/NVVMIntrinsicUtils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ inline APFloat::roundingMode GetFMARoundingMode(Intrinsic::ID IntrinsicID) {
663663
}
664664

665665
inline void printTcgen05MMAKind(raw_ostream &OS, const Constant *ImmArgVal) {
666-
if (const ConstantInt *CI = dyn_cast<ConstantInt>(ImmArgVal)) {
666+
if (const auto *CI = dyn_cast<ConstantInt>(ImmArgVal)) {
667667
uint64_t Val = CI->getZExtValue();
668668
switch (static_cast<Tcgen05MMAKind>(Val)) {
669669
case Tcgen05MMAKind::F16:
@@ -686,7 +686,7 @@ inline void printTcgen05MMAKind(raw_ostream &OS, const Constant *ImmArgVal) {
686686

687687
inline void printTcgen05CollectorUsageOp(raw_ostream &OS,
688688
const Constant *ImmArgVal) {
689-
if (const ConstantInt *CI = dyn_cast<ConstantInt>(ImmArgVal)) {
689+
if (const auto *CI = dyn_cast<ConstantInt>(ImmArgVal)) {
690690
uint64_t Val = CI->getZExtValue();
691691
switch (static_cast<Tcgen05CollectorUsageOp>(Val)) {
692692
case Tcgen05CollectorUsageOp::DISCARD:

llvm/lib/IR/AsmWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4589,7 +4589,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
45894589
ListSeparator LS;
45904590
Function *CalledFunc = CI->getCalledFunction();
45914591
auto PrintArgComment = [&](unsigned ArgNo) {
4592-
const Constant *ConstArg = dyn_cast<Constant>(CI->getArgOperand(ArgNo));
4592+
const auto *ConstArg = dyn_cast<Constant>(CI->getArgOperand(ArgNo));
45934593
if (!ConstArg)
45944594
return;
45954595
std::string ArgComment;

llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ void CodeGenIntrinsic::setProperty(const Record *R) {
457457
StringRef FuncName;
458458

459459
for (const Init *PropInit : Properties->getElements()) {
460-
if (const DefInit *PropDef = dyn_cast<DefInit>(PropInit)) {
460+
if (const auto *PropDef = dyn_cast<DefInit>(PropInit)) {
461461
const Record *PropRec = PropDef->getDef();
462462

463463
if (PropRec->isSubClassOf("ArgName"))

llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ void Intrinsic::printImmArg(ID IID, unsigned ArgIdx, raw_ostream &OS, const Cons
852852

853853
OS << " case " << Int.EnumName << ":\n";
854854
OS << " switch (ArgIdx) {\n";
855-
for (const auto &[ArgIdx, ArgName, FuncName] : Int.PrettyPrintFunctions) {
855+
for (const auto [ArgIdx, ArgName, FuncName] : Int.PrettyPrintFunctions) {
856856
OS << " case " << ArgIdx << ":\n";
857857
OS << " OS << \"" << ArgName << "=\";\n";
858858
if (!FuncName.empty()) {

0 commit comments

Comments
 (0)