llvm-6502/lib
Chandler Carruth c9520b48ae [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229642 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-18 07:13:48 +00:00
..
Analysis Analysis: fix buildbots 2015-02-18 05:09:50 +00:00
AsmParser AsmParser: extractvalue requires at least one index operand 2015-02-16 09:18:13 +00:00
Bitcode Prefer SmallVector::append/insert over push_back loops. 2015-02-17 15:29:18 +00:00
CodeGen LiveRangeCalc: Rename some parameters from kill to use, NFC. 2015-02-18 01:50:52 +00:00
DebugInfo llvm-pdbdump: Add flags controlling the type of values to dump. 2015-02-15 20:27:53 +00:00
ExecutionEngine Don't deference the section_end() iterator. 2015-02-17 20:07:28 +00:00
Fuzzer [fuzzer] move default sanitizer options to a separate file 2015-02-06 19:52:07 +00:00
IR [X86] Remove AVX2 and SSE2 pslldq and psrldq intrinsics. We can represent them in IR with vector shuffles now. All their uses have been removed from clang in favor of shuffles. 2015-02-18 06:24:44 +00:00
IRReader Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker Prefer SmallVector::append/insert over push_back loops. 2015-02-17 15:29:18 +00:00
LTO [PM] Remove the old 'PassManager.h' header file at the top level of 2015-02-13 10:01:29 +00:00
MC Add r228980 back. 2015-02-17 20:48:01 +00:00
Object [Object] Support reading 64-bit MIPS ELF archives 2015-02-17 18:54:22 +00:00
Option Prefer SmallVector::append/insert over push_back loops. 2015-02-17 15:29:18 +00:00
ProfileData Re-apply "InstrProf: Add unit tests for the profile reader and writer" 2015-02-18 01:58:17 +00:00
Support Prefer SmallVector::append/insert over push_back loops. 2015-02-17 15:29:18 +00:00
TableGen MSVC 2013 does not ICE on this code in the same fashion that MSVC 2012 did; NFC. 2015-02-16 19:33:36 +00:00
Target [x86] Rewrite the byte shift detection to not use boolean variables to 2015-02-18 07:13:48 +00:00
Transforms [X86] Remove AVX512 pslldq/psrldq shift intrinsics. They aren't implemented yet and when they are they should be done with shuffles like SSE2 and AVX2. 2015-02-18 06:24:49 +00:00
CMakeLists.txt Reverting r227452, which adds back the fuzzer library. Now excluding the fuzzer library based on LLVM_USE_SANITIZE_COVERAGE being set or unset. 2015-01-29 16:58:29 +00:00
LLVMBuild.txt
Makefile Move DebugInfo to DebugInfo/DWARF. 2015-01-30 18:07:45 +00:00