[PATCH] D95803: Ensure that InstructionCost actually implements a total ordering

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 13:01:36 PST 2021


ctetreau added inline comments.


================
Comment at: llvm/unittests/Support/InstructionCostTest.cpp:42
 
+  EXPECT_TRUE((IThreeA < ITwo) || (IThreeA > ITwo) || (IThreeA == ITwo));
+  EXPECT_NE(IThreeA, ITwo);
----------------
sdesmalen wrote:
> Is there value in this test, if all three subexpressions have their expected value tested below?
I left this test here because this is "the" failure. The next three lines just test the specific implementation that we have today, but if 42 fails then that means that there is not a total ordering of any sort.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95803



More information about the llvm-commits mailing list