Go to file
Chandler Carruth 55553f5299 [x86] Rewrite the byte shift detection to not use boolean variables to
track state.

I didn't like this in the code review because the pattern tends to be
error prone, but I didn't see a clear way to rewrite it. Turns out that
there were bugs here, I found them when fuzz testing our shuffle
lowering for correctness on x86.

The core of the problem is that we need to consistently test all our
preconditions for the same directionality of shift and the same input
vector. Instead, formulate this as two predicates (one doesn't depend on
the input in any way), pass things like the directionality and input
vector as inputs, and loop over the alternatives.

This fixes a pattern of very rare miscompiles coming out of this code.
Turned up roughly 4 out of every 1 million v8 shuffles in my fuzz
testing. The new code is over half a million test runs with no failures
yet. I've also fuzzed every other function in the lowering code with
over 3.5 million test cases and not discovered any other miscompiles.

llvm-svn: 229642
2015-02-18 07:13:48 +00:00
clang Port r163224 to C++. 2015-02-18 05:19:40 +00:00
clang-tools-extra [clang-tidy] Fixed two wrong fix-it cases in misc-inefficient-algorithm checker. 2015-02-17 21:45:38 +00:00
compiler-rt Revert "Remove support for building sanitizers from Makefile/autoconf build." 2015-02-17 23:30:51 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Implement log10 2015-01-30 18:00:34 +00:00
libcxx [libcxx] Add <experimental/ratio> 2015-02-17 16:52:03 +00:00
libcxxabi Do not add -fno-exceptions without -funwind-tables 2015-02-16 19:51:06 +00:00
lld [ELF] Demangle: don't expose raw info when getter is available. 2015-02-18 03:54:21 +00:00
lldb [CMake] Remove debug message from CMakeLists.txt 2015-02-18 00:27:11 +00:00
llgo Build cgo and llgo-go 2015-02-14 01:46:01 +00:00
llvm [x86] Rewrite the byte shift detection to not use boolean variables to 2015-02-18 07:13:48 +00:00
openmp Fixed memory corruption problem. 2015-02-10 20:10:21 +00:00
polly Add missing files to autoconf build 2015-02-17 08:15:14 +00:00