[PATCH] D139169: [RISCV][WIP] Move VSPILL/VRELOAD expansion for vector tuples to eliminateFrameIndex.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 13:01:59 PST 2022
reames added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp:276
+ "Unexpected subreg numbering");
+ } else
+ assert(LMUL == 1 && "LMUL must be 1, 2, or 4.");
----------------
craig.topper wrote:
> reames wrote:
> > Missing {} will cause this to not compile without assertions. Same in the function below.
> Why? I moved this from another function that didn't have braces and it has been compiling fine.
So, doesn't an assert expand to an empty string when assertions are enabled?
If so, we have a dangling else. The next statement effectively becomes the body of the else.
Looking at the code you copied from, this is really quite interesting as it looks like that code is just blatantly wrong. The key lowering loop would be conditional on the else. Do we have any testing for this? And if we do, does that test pass without asserts?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139169/new/
https://reviews.llvm.org/D139169
More information about the llvm-commits
mailing list