Go to file
Sanjay Patel 5bd36644c8 [InstCombine] fix shuffle-of-binops transform to avoid poison/undef
As noted in D48987, there are many different ways for this transform to go wrong. 
In particular, the poison potential for shifts means we have to more careful with those ops. 
I added tests to make that behavior visible for all of the different cases that I could find.

This is a partial fix. To make this review easier, I did not make changes for the single binop 
pattern (handled in foldSelectShuffleWith1Binop()). I also left out some potential optimizations 
noted with TODO comments. I'll follow-up once we're confident that things are correct here.

The goal is to correct all marked FIXME tests to either avoid the shuffle transform or do it safely.

Note that distinguishing when the shuffle mask contains undefs and using getBinOpIdentity() allows 
for some improvements to div/rem patterns, so there are wins along with the missed opportunities 
and fixes.

Differential Revision: https://reviews.llvm.org/D49047

llvm-svn: 336546
2018-07-09 13:21:46 +00:00
clang [PCH] Add an option to not write comments into PCH 2018-07-09 11:33:23 +00:00
clang-tools-extra [clangd] Do not write comments into Preamble PCH 2018-07-09 11:33:31 +00:00
compiler-rt Revert "Make __gcov_flush flush counters for all shared libraries" 2018-07-07 00:07:00 +00:00
debuginfo-tests [debuginfo-tests] Always use the system python to invoke llgdb.py. 2018-06-10 19:38:26 +00:00
libclc atom: Use volatile pointers for cl_khr_{global,local}_int32_{base,extended}_atomics 2018-06-21 19:27:39 +00:00
libcxx type_traits: aligned_union is NOT the same as __uncvref [NFC] 2018-07-08 00:06:27 +00:00
libcxxabi [demangler] Avoid alignment warning 2018-07-05 06:24:29 +00:00
libunwind Introduce a separate preprocessor macro, _LIBUNWIND_USE_DLADDR, for directly controlling a dependency on dladdr(). This will allow us to use libunwind without adding a libdl dependency. 2018-06-29 20:41:50 +00:00
lld [PDB] One more fix for hasing GSI records. 2018-07-06 21:01:42 +00:00
lldb Add LLDB_API to SBAddress's operator==. 2018-07-07 18:54:44 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm [InstCombine] fix shuffle-of-binops transform to avoid poison/undef 2018-07-09 13:21:46 +00:00
openmp Define the __STDC_FORMAT_MACROS to avoid test failure on some platforms. 2018-07-06 14:15:59 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly Add a file that was missing in r336425 2018-07-06 11:33:35 +00:00
README.md

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.