[PATCH] D117426: [AVR] Only push and clear R1 in interrupts when necessary

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 14 00:24:16 PST 2022


benshi001 added inline comments.


================
Comment at: llvm/lib/Target/AVR/AVRISelLowering.cpp:843
+    SDValue Operand = N->getOperand(I);
+    if (Operand.getValueType() == MVT::Glue) {
+      // The glue operand always needs to be at the end, so we need to treat it
----------------
I think the following form is more readable:

```
for (unsigned I = 0; I < N->getNumOperands(); I++) {
  SDValue Operand = N->getOperand(I);
  if (Operand.getValueType() == MVT::Glue)
    // The glue operand always needs to be at the end, so we need to treat it
    // specially.
    Glue = Operand;
  else
    Ops.push_back(Operand);
}
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117426/new/

https://reviews.llvm.org/D117426



More information about the llvm-commits mailing list