[PATCH] D13347: [FastISel][X86] Teach how to select SSE2/AVX bitcasts between 128/256-bit vector types.

Andrea Di Biagio via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 14:39:01 PDT 2015


andreadb added a comment.

Hi Quentin,


================
Comment at: lib/Target/X86/X86FastISel.cpp:3240
@@ +3239,3 @@
+    if (!X86ScalarSSEf64)
+      return false;
+
----------------
qcolombet wrote:
> Why do we have to check that here?
> We are interested in 128 and 256 bit vector types. I do not understand why the fact that f64 may be mapped on x87 need to be considered?
While it is true that X86ScalarSSEf64 is initialized to Subtarget->hasSSE2(), X86ScalarSSEf64 should only be used to reason on f64 types. So it is wrong to use it in this context.

I will change it to an explicit check for feature SSE2.


================
Comment at: lib/Target/X86/X86FastISel.cpp:3247
@@ +3246,3 @@
+        SrcVT.getSizeInBits() != DstVT.getSizeInBits())
+      return false;
+
----------------
qcolombet wrote:
> Could you add test cases for these checks?
> In particular the different SizeInBits part.
My bad.. That check makes no sense since source and destination bit widths must always be identical for bitcast operations.
I will remove that redundant check.


http://reviews.llvm.org/D13347





More information about the llvm-commits mailing list