[PATCH] D51932: [AMDGPU] Fix-up cases where writelane has 2 SGPR operands

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 11 12:39:52 PDT 2018


rampitec added inline comments.


================
Comment at: lib/Target/AMDGPU/SIFixSGPRCopies.cpp:457
+
+  for (MachineFunction::iterator BI = MF.begin(), BE = MF.end(); BI != BE;
+       ++BI) {
----------------
Why cannot you use loop in the runOnMachineFunction()?


================
Comment at: lib/Target/AMDGPU/SIFixSGPRCopies.cpp:482
+          bool Resolved = false;
+          std::vector<MachineOperand *> MOs{&Src0, &Src1};
+          for (auto MO : MOs) {
----------------
You do not need vector here.

```
for (auto MO : {&Src0, &Src1})
```


Repository:
  rL LLVM

https://reviews.llvm.org/D51932





More information about the llvm-commits mailing list