[PATCH] D16325: Add support for computing SHA1 in LLVM

Amaury SECHET via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 17:37:53 PST 2016


deadalnix added a subscriber: deadalnix.
deadalnix added a comment.

If perfs matter, I would do it that way:

https://github.com/bitcoin/bitcoin/blob/master/src/crypto/sha1.cpp


================
Comment at: lib/Support/SHA1.cpp:71
@@ +70,3 @@
+  for (i = 0; i < 80; i++) {
+    if (i >= 16) {
+      t = InternalState.Buffer[(i + 13) & 15] ^
----------------
I would do 2 loops


http://reviews.llvm.org/D16325





More information about the llvm-commits mailing list