[PATCH] D35188: Add bitreverse LNT benchmark.

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 13:13:38 PDT 2017


nemanjai added inline comments.


================
Comment at: SingleSource/Benchmarks/Misc/CMakeLists.txt:26
   pi.c
+  revertBits.c
   richards_benchmark.c
----------------
I don't follow why the name is `revertBits` when what you're doing is **reversing** the bits.


================
Comment at: SingleSource/Benchmarks/Misc/revertBits.c:12
+#define NUM 0x1000000
+int __attribute__((noinline)) ReverseBits32(int n) {
+  n = ((n >> 1) & 0x55555555) | ((n & 0x55555555) << 1);
----------------
We had equivalently poor code gen for `__builtin_bitreverse<N>`. Don't we want this in the test case as well?


https://reviews.llvm.org/D35188





More information about the llvm-commits mailing list