[PATCH] D39848: [RISCV] Support lowering FrameIndex

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 00:06:11 PST 2017


asb added inline comments.


================
Comment at: lib/Target/RISCV/RISCVISelDAGToDAG.cpp:94
+  FrameIndexSDNode *FIN = nullptr;
+  if ((FIN = dyn_cast<FrameIndexSDNode>(Addr))) {
+    Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), MVT::i32);
----------------
apazos wrote:
> too many ( )
The extra parens are actually necessary to avoid a compiler warning "warning: using the result of an assignment as a condition without parentheses [-Wparentheses]". This is a fairly ugly idiom and we can avoid the need for it altogether, so I've refactored the code to do so.


https://reviews.llvm.org/D39848





More information about the llvm-commits mailing list