[PATCH] D118312: [X86] TCRETURNmi fix for 32bit platform

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 2 05:35:15 PST 2022


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86InstrCompiler.td:1246
+  else if (N->getNumOperands() && isa<GlobalAddressSDNode>(BasePtr->getOperand(0)))
+    NumRegs = 3;
+  for (unsigned i = 3, e = N->getNumOperands(); i != e; ++i)
----------------
Why do we need to check `N->getNumOperands()`?


================
Comment at: llvm/lib/Target/X86/X86InstrCompiler.td:1247
+    NumRegs = 3;
+  for (unsigned i = 3, e = N->getNumOperands(); i != e; ++i)
+    if (isa<RegisterSDNode>(N->getOperand(i)) && ( NumRegs-- == 0))
----------------
Should we add 2 more tests for the 2 `NumRegs = 3`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118312



More information about the llvm-commits mailing list