[PATCH] D155688: [PATCH] [llvm] [InstCombine] Reassociate loop invariant GEP index calculations.

Paul Walker via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 20 03:32:28 PDT 2023


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:2332
   }
-
+  if (GEP.getNumIndices() == 1 && !GEP.getType()->isVectorTy()) {
+    auto *Idx = dyn_cast<BinaryOperator>(GEP.getOperand(1));
----------------
Perhaps move this block after the `We do not handle pointer-vector geps here` immediately below so this test can be removed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155688



More information about the cfe-commits mailing list