[PATCH] D145665: [Xtensa] Implement lowering ConstantPool and address operations.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 06:31:18 PDT 2023


arsenm requested changes to this revision.
arsenm added a comment.
This revision now requires changes to proceed.
Herald added a subscriber: sstefan1.

Needs tests



================
Comment at: llvm/lib/Target/Xtensa/XtensaISelLowering.cpp:593
+  if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Op)) {
+    auto PtrVt = getPointerTy(DAG.getDataLayout());
+    const GlobalValue *GV = G->getGlobal();
----------------
MVT


================
Comment at: llvm/lib/Target/Xtensa/XtensaISelLowering.cpp:596-608
+    // Check Op SDNode users
+    // If there are only CALL nodes, don't expand Global Address
+    SDNode &OpNode = *Op.getNode();
+    bool Val = false;
+    for (SDNode::use_iterator UI = OpNode.use_begin(); UI != OpNode.use_end();
+         ++UI) {
+      SDNode &User = *UI.getUse().getUser();
----------------
Shouldn't need to consider the users, can handle this as a fold in the call


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145665/new/

https://reviews.llvm.org/D145665



More information about the llvm-commits mailing list