[PATCH] [X86] replace vextractf128 intrinsics with generic shuffles

Sanjay Patel spatel at rotateright.com
Thu Mar 12 10:29:48 PDT 2015


Comment at: lib/Headers/avxintrin.h:1184
@@ +1183,3 @@
+    (__v8sf)(V), \
+    (__v8sf)(V), \
+    (((M) & 1) ? 4 : 0), \
craig.topper wrote:
> Not sure if its safe to access V twice. It could be a function call that we maybe shouldn't invoke twice. May need a temporary here even though it might fail Wshadow
> Or maybe just feed an appropriate zero vector to the second shuffle argument?
Nice catch! I think the zero vector implementation should be safe. Checked in at r232061.

While we're here, do you see a problem with casting the 32-bit / packed single case to use 64-bit values instead? If we do it that way, the masks would be identical for all cases. And then we could just define the 2nd and 3rd macros in terms of the 1st?



More information about the cfe-commits mailing list