I think this is getting close on __dynamic_cast.  There's been quite a bit of code rearrangement, renaming, and better commenting.  This exercise has exposed and fixed a few more bugs.  I've also added several more tests (there's definitely a need for more tests here).

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@148227 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/dynamic_cast_stress.cpp b/test/dynamic_cast_stress.cpp
index 5d3c341..a6fce73 100644
--- a/test/dynamic_cast_stress.cpp
+++ b/test/dynamic_cast_stress.cpp
@@ -73,9 +73,9 @@
 Timing results I'm seeing (median of 3 microseconds):
 
                           libc++abi    gcc's dynamic_cast
-B<Width/2, Depth> -O3      64.214         93.190           libc++abi 45% faster
-B<Width/2, Depth> -Os      79.520         94.103           libc++abi 18% faster
-A<Width, Depth>   -O3      11.833         33.134           libc++abi 180% faster
-A<Width, Depth>   -Os      14.663         31.553           libc++abi 115% faster
+B<Width/2, Depth> -O3      50.694         93.190           libc++abi 84% faster
+B<Width/2, Depth> -Os      55.235         94.103           libc++abi 70% faster
+A<Width, Depth>   -O3      14.895         33.134           libc++abi 122% faster
+A<Width, Depth>   -Os      16.515         31.553           libc++abi 91% faster
 
 */