[PATCH] D125066: [AVR][NFC] Eliminate warning 'unused variable'
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 19:34:05 PDT 2022
benshi001 created this revision.
benshi001 added reviewers: aykevl, MaskRay, Patryk27.
Herald added subscribers: StephenFan, Jim, hiraditya, dylanmckay.
Herald added a project: All.
benshi001 requested review of this revision.
Herald added subscribers: llvm-commits, jacquesguan.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125066
Files:
llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
Index: llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
===================================================================
--- llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
+++ llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
@@ -1217,8 +1217,8 @@
assert(MI.getOperand(0).getReg() == AVR::SP &&
"SP is expected as base pointer");
- assert(STI.getFrameLowering()->hasReservedCallFrame(MF) &&
- "unexpected STDSPQRr pseudo instruction");
+ if (!STI.getFrameLowering()->hasReservedCallFrame(MF))
+ assert(0 && "unexpected STDSPQRr pseudo instruction");
MI.setDesc(TII->get(AVR::STDPtrQRr));
MI.getOperand(0).setReg(AVR::R29R28);
@@ -1235,8 +1235,8 @@
assert(MI.getOperand(0).getReg() == AVR::SP &&
"SP is expected as base pointer");
- assert(STI.getFrameLowering()->hasReservedCallFrame(MF) &&
- "unexpected STDWSPQRr pseudo instruction");
+ if (!STI.getFrameLowering()->hasReservedCallFrame(MF))
+ assert(0 && "unexpected STDWSPQRr pseudo instruction");
MI.setDesc(TII->get(AVR::STDWPtrQRr));
MI.getOperand(0).setReg(AVR::R29R28);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125066.427512.patch
Type: text/x-patch
Size: 1093 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220506/9f5f50d0/attachment.bin>
More information about the llvm-commits
mailing list