[PATCH] D77448: [PowerPC] Canonicalize shuffles to match more single-instruction masks on LE

Lei Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 11:53:11 PDT 2020


lei added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:14037
+  // Find first non-undef input.
+  for (int i = 0, e = Op.getNumOperands(); i < e; i++) {
+    FirstOp = Op.getOperand(i);
----------------
Can this and the for-loop below be a range based for-loop?
```
for (auto FirstOp : Op->op_values())
  if (!FirstOp.isUndef())
    break;
```


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.h:228
+    /// place (i.e. does not involve a swap to put it at element zero on LE).
+    S_TO_V_PERMUTED,
+
----------------
Maybe consider using existing naming used for scalar and vector ISD nodes:  SCALAR_TO_VEC_PERMUTED


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77448





More information about the llvm-commits mailing list