summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSnappy Team <no-reply@google.com>2021-07-28 15:32:22 +0000
committerVictor Costan <costan@google.com>2021-08-02 14:50:09 +0000
commitc8f7641646cd4915f0dc92a81acf09767dfdddca (patch)
tree2cc646d14f4575f52274dc44a511d9973b5c6227
parent9cc3689b2120bd25a74f264f05ed8692c9e22dfe (diff)
downloadsnappy-git-c8f7641646cd4915f0dc92a81acf09767dfdddca.tar.gz
Remove inline assembly as the bug in clang was fixed
PiperOrigin-RevId: 387356237
-rw-r--r--snappy.cc16
1 files changed, 0 insertions, 16 deletions
diff --git a/snappy.cc b/snappy.cc
index 632ab85..a8a8e80 100644
--- a/snappy.cc
+++ b/snappy.cc
@@ -1141,22 +1141,6 @@ std::pair<const uint8_t*, ptrdiff_t> DecompressBranchless(
}
std::ptrdiff_t delta = op + len_min_offset - len;
if (SNAPPY_PREDICT_FALSE(delta < 0)) {
-#if defined(__GNUC__) && defined(__x86_64__)
- // TODO
- // When validating, both code path reduced to `op += len`. Ie. this
- // becomes effectively
- //
- // if (delta < 0) if (tag_type != 0) goto break_loop;
- // op += len;
- //
- // The compiler interchanges the predictable and almost always false
- // first if-statement with the completely unpredictable second
- // if-statement, putting an unpredictable branch on every iteration.
- // This empty asm is worth almost 2x, which I think qualifies for an
- // award for the most load-bearing empty statement.
- asm("");
-#endif
-
// Due to the spurious offset in literals have this will trigger
// at the start of a block when op is still smaller than 256.
if (tag_type != 0) goto break_loop;