aacc + bbdd
SkMatrix::mapPts() using aacc/bbdd was always worse than using badc():
- On Intel, it was faster than exisiting swizzle, but badc() is 10% faster still (one pshufd instead of two).
- On ARM, existing swizzle < badc() < aacc()+bbdd(), even though aacc() then bbdd() is really a single vtrn instruction.
I will revert SkMatrix.cpp before submitting. Just thought you might like to look.
Will think more and try to gear up Instruments on ARM.
BUG=skia:
Review URL: https://codereview.chromium.org/1012573003
diff --git a/tests/Sk4xTest.cpp b/tests/Sk4xTest.cpp
index cbae492..4dc4c36 100644
--- a/tests/Sk4xTest.cpp
+++ b/tests/Sk4xTest.cpp
@@ -136,6 +136,10 @@
DEF_TEST(Sk4x_Swizzle, r) {
ASSERT_EQ(Sk4f(1,2,3,4).badc(), Sk4f(2,1,4,3));
+ ASSERT_EQ(Sk4f(1,2,3,4).aacc(), Sk4f(1,1,3,3));
+ ASSERT_EQ(Sk4f(1,2,3,4).bbdd(), Sk4f(2,2,4,4));
ASSERT_EQ(Sk4i(1,2,3,4).badc(), Sk4i(2,1,4,3));
+ ASSERT_EQ(Sk4i(1,2,3,4).aacc(), Sk4i(1,1,3,3));
+ ASSERT_EQ(Sk4i(1,2,3,4).bbdd(), Sk4i(2,2,4,4));
}