[PATCH] D40805: [RISCV] Support for varargs

Leslie Zhai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 19:35:57 PST 2018


xiangzhai added inline comments.


================
Comment at: lib/Target/RISCV/RISCVISelLowering.cpp:446
+    unsigned RegIdx = State.getFirstUnallocated(ArgGPRs);
+    if (RegIdx != array_lengthof(ArgGPRs) && RegIdx % 2 == 1) {
+      State.AllocateReg(ArgGPRs);
----------------
`RegIdx % 2 == 1` is an odd register, not an even, but the comment is "ensure it is assigned to an even register".


https://reviews.llvm.org/D40805





More information about the llvm-commits mailing list