[PATCH] [X86][FastIsel] Teach how to select scalar integer to float/double conversions.

Quentin Colombet qcolombet at apple.com
Tue Feb 17 13:57:57 PST 2015


================
Comment at: lib/Target/X86/X86FastISel.cpp:2042
@@ +2041,3 @@
+  const MCInstrDesc &II = TII.get(Opcode);
+  OpReg = constrainOperandRegClass(II, OpReg, (HasAVX ? 2 : 1));
+  
----------------
Should be just 1 instead of (HasAVX …).

Indeed, OpReg is the equivalent of the first operand for the description of the CVT. The fact that you will insert an implicit def is orthogonal so you do not have to account for that when doing the query.

http://reviews.llvm.org/D7698

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list