[PATCH] D156620: [InstCombine] Improve foldOpIntoPhi() to use isImpliedCondition

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 30 09:09:14 PDT 2023


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:1363
+        I.getType()->isIntOrIntVectorTy()) {
+      Instruction *FoldOpClone = I.clone();
+      size_t OperandsSize = Ops.size();
----------------
There is an isImpliedByCondition() overload that accepts unpacked icmp operands. We should use that instead of cloning the instruction.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156620



More information about the llvm-commits mailing list