[PATCH] D37734: [GlobalISel][X86] G_FCONSTANT support.

Elena Demikhovsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 05:23:48 PDT 2017


delena added inline comments.


================
Comment at: lib/Target/X86/X86InstructionSelector.cpp:1204
+  const unsigned DstReg = I.getOperand(0).getReg();
+  const LLT DstTy = MRI.getType(DstReg);
+  const RegisterBank &RegBank = *RBI.getRegBank(DstReg, MRI, TRI);
----------------
should it be "const LLT&" ?


================
Comment at: lib/Target/X86/X86InstructionSelector.cpp:1224
+  if (CM == CodeModel::Large) {
+    unsigned AddrReg = MRI.createVirtualRegister(&X86::GR64RegClass);
+    BuildMI(*I.getParent(), I, DbgLoc, TII.get(X86::MOV64ri), AddrReg)
----------------
Does the Large CM mean that the target is 64 bit? Please add "assert" here.


================
Comment at: lib/Target/X86/X86InstructionSelector.cpp:1250
+                   << " operand\n");
+      return false;
+    }
----------------
I do not really understand what happens if you exit here. Could you, please, add some comments?



https://reviews.llvm.org/D37734





More information about the llvm-commits mailing list