[PATCH] D126268: [InstCombine] [NFC] refector foldXorOfICmps

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 01:02:02 PDT 2022


RKSimon added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:3000
+    if (LHS0 == RHS1 && LHS1 == RHS0)
+      std::swap(LHS0, LHS1);
+    if (LHS0 == RHS0 && LHS1 == RHS1) {
----------------
If the if() below fails - doesn't this leave the LHS0/LHS1 operands in a commuted state further down?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126268



More information about the llvm-commits mailing list