rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

This looks good.

As a larger issue, LLVM fast isel definitely won't pattern match this series of 
shifts and selects to rotl at -O0. There are some users who want branchless 
constant time rotates regardless of optimization level 
(https://llvm.org/bugs/show_bug.cgi?id=24226). My thinking is that the shifts 
are more analyzable to LLVM than an intrinsic, so we should leave these 
intrinsics alone and tell such users to use inline asm if they need these kinds 
of low-level guarantees. It still isn't very satisfactory. =/


================
Comment at: test/CodeGen/x86-rot-intrinsics.c:9-11
@@ +8,5 @@
+#else
+// Don't include mm_malloc.h, it's system specific.
+#define __MM_MALLOC_H
+#include <immintrin.h>
+#endif
----------------
Any reason not to use -ffreestanding to deal with this on the Linux side of the 
test like we do for windows?


http://reviews.llvm.org/D12271



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to