[PATCH] D139530: [WebAssembly] Add ComplexPattern for loads

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 10:33:02 PST 2022


luke added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp:320-321
+  // Folds constants in an add into the offset.
+  for (size_t i = 0; i < 2; ++i) {
+    SDValue Op = N.getOperand(i);
+    SDValue OtherOp = N.getOperand(i == 0 ? 1 : 0);
----------------
Is there a better way to iterate over the two operands of an add?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139530



More information about the llvm-commits mailing list