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

Andrea Di Biagio Andrea_DiBiagio at sn.scee.net
Tue Feb 17 10:20:51 PST 2015


Hi Quentin,


================
Comment at: lib/Target/X86/X86FastISel.cpp:2010
@@ +2009,3 @@
+bool X86FastISel::X86SelectSIToFP(const Instruction *I) {
+  if (I->getOperand(0)->getType()->isIntegerTy(32)) {
+    // Select integer to float/double conversion.
----------------
qcolombet wrote:
> Use early exist here.
I will use an early-exit.

================
Comment at: test/CodeGen/X86/fast-isel-int-float-conversion.ll:7
@@ +6,3 @@
+; ALL-LABEL: int_to_double_rr:
+; SSE2-NOT: vcvtsi2sdl
+; AVX: vcvtsi2sdl %edi, %xmm0, %xmm0
----------------
qcolombet wrote:
> Shouldn’t we have some check for the actual pattern for SSE2?
Yes, for SSE2 we could match 'cvtsi2sdl %edi, %xmm0'. I just wanted to make sure that with SSE2 we didn't have the vex prefix. I agree that it is a bit confusing so I will change it.

http://reviews.llvm.org/D7698

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






More information about the llvm-commits mailing list