[PATCH] D39875: [PPC] Change i32 constant in store instruction to i64

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 15:38:53 PST 2017


nemanjai added a comment.

> There are two SelectionDAG::getTruncStore() functions, but neither of them can accept the general (base + offset) addressing mode, so if we use getTruncStore, we still need UpdateNodeOperands to add offset if there is one.

Fair enough, it's unfortunate that there isn't an overload that can do the job. And providing another overload is probably even more intrusive than adding a mutator function like this to `StoreSDNode`. Can you please add a comment explaining that in the code since this looks different from other combines and others may wonder why we didn't just use `DAG.getTruncStore()`?

LGTM.



================
Comment at: include/llvm/CodeGen/SelectionDAGNodes.h:2018
   bool isTruncatingStore() const { return StoreSDNodeBits.IsTruncating; }
+  void setTruncatingStore(bool Truncating) { StoreSDNodeBits.IsTruncating = Truncating; };
 
----------------
I think this line might be too long.


https://reviews.llvm.org/D39875





More information about the llvm-commits mailing list