[PATCH] D126448: [NFC][LegalizeTypes][VP] Refactor code in SplitRes_Select

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 01:00:10 PDT 2022


craig.topper added a comment.

I don't understand the motivation for this change. LLVM coding guidelines encourage using early returns.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp:547
+  } else {
+    assert((Opcode == ISD::VP_SELECT || Opcode == ISD::VP_MERGE) &&
+           "Expected VP_SELECT Or VP_MERGE Opcode");
----------------
This assert is exactly opposite the condition of the previous if. It doesn't check anything new.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126448



More information about the llvm-commits mailing list