[PATCH] D145668: [Xtensa] Implement lowering SELECT_CC, SETCC

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 06:10:59 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:594-595
+  // Wrap select nodes
+  return DAG.getNode(XtensaISD::SELECT_CC, DL, Ty, LHS, RHS, TrueV, FalseV,
+                     TargetCC);
+}
----------------
How is this any different from using the generic SELECT_CC?


================
Comment at: llvm/lib/Target/Xtensa/XtensaISelLowering.cpp:608-618
+  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();
+    unsigned OpCode = User.getOpcode();
+    if (OpCode == ISD::BRCOND) {
----------------
Should try avoid looking at users in lowerings. Can this handling be performed in a separate combine?


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

https://reviews.llvm.org/D145668



More information about the llvm-commits mailing list