[PATCH] D149575: [CodeGen] Support allocating of arguments by decreasing offsets
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 18 08:58:04 PDT 2023
barannikov88 added inline comments.
================
Comment at: llvm/unittests/CodeGen/CCStateTest.cpp:37
+
+ ASSERT_EQ(Info.AllocateStack(1, Align(1)), -1);
+ ASSERT_EQ(Info.AllocateStack(1, Align(2)), -2);
----------------
arsenm wrote:
> These should use EXPECT_EQ with swapped arguments
@arsenm
I used ASSERT_EQ because if one of the checks fails, the rest will most likely fail too. That is, there is little point in continuing.
About swapping the operands -- I vaguely remember it was the preferred style, but I think it is no longer relevant (https://groups.google.com/a/chromium.org/g/chromium-dev/c/3aQU5iM5Ov0).
There seems to be no consistency in LLVM unit tests regarding the order of operands.
I was planning to apply the suggestion when pushing anyway, but forgot. Sorry about that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149575/new/
https://reviews.llvm.org/D149575
More information about the llvm-commits
mailing list