[PATCH] D109279: [InstCombine] Sink bin op into hands of select if one hand becomes constant

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 4 13:45:34 PDT 2021


xbolva00 added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:876
     Cond = A;
+    if (I.getOpcode() == BinaryOperator::Xor) return nullptr;
     True = SimplifyBinOp(Opcode, B, RHS, FMF, Q);
----------------
HACK just for initial patch.

We have some reverse transformation which creates infinite loop in IC with sub-minmax.ll.

Maybe bail out if matchSelectPattern returns something? 


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

https://reviews.llvm.org/D109279



More information about the llvm-commits mailing list