Go to file
Sanjay Patel 0279b5b0b8 [TargetLowering] try harder to determine undef elements of vector binops
This might be the start of tracking all vector element constants generally if we take it to its 
logical conclusion, but let's stop here and make sure this is correct/beneficial so far.

The affected tests require a convoluted path before they get simplified currently because we 
don't call SimplifyDemandedVectorElts() from binops directly and don't modify the binop operands 
directly in SimplifyDemandedVectorElts().

That's why the tests all have a trailing shuffle to induce a chain reaction of transforms. So 
something like this is happening:

1. Improve the knowledge of undefs in the binop via a SimplifyDemandedVectorElts() call that 
   originates from a shuffle.
2. Transfer that undef knowledge back to the shuffle mask user as more undef lanes.
3. Combine the modified shuffle by calling SimplifyDemandedVectorElts() again.
4. Translate the improved shuffle mask as undemanded lanes of build vector constants causing 
   those to become full undef constants.
5. Simplify the binop now that it has a full undef operand.

As we can see from the unchanged 'and' and 'or' tests, tracking undefs alone isn't a full solution. 
We would need to track zero and all-ones constants to improve those opcodes. We'd probably need to 
track NaN for FP ops too (assuming we don't have fast-math-flags set).

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

llvm-svn: 352880
2019-02-01 15:35:12 +00:00
clang [libclang] Fix -DBUILD_SHARED_LIBS=on build after rC352803 2019-02-01 14:31:01 +00:00
clang-tools-extra [clangd] Expose SelectionTree to code tweaks, and use it for swap if branches. 2019-02-01 15:09:47 +00:00
compiler-rt Mark __rela_iplt_{start,end} as weak. 2019-02-01 00:43:31 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
libcxx Fix a bit of libc++-specific behavior in the regex tests; add a missing test. Reviewed as https://reviews.llvm.org/D57391 Thanks to Andrey Maksimov for the patch 2019-01-31 18:54:26 +00:00
libcxxabi [CMake] Use correct visibility for linked libraries in CMake 2019-01-30 23:18:05 +00:00
libunwind [CMake] Use correct visibility for linked libraries in CMake 2019-01-30 23:18:05 +00:00
lld [WebAssembly] Support imports from custom module names 2019-02-01 02:29:57 +00:00
lldb [PDB] Fix build after r352845 2019-02-01 11:10:28 +00:00
llgo Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
llvm [TargetLowering] try harder to determine undef elements of vector binops 2019-02-01 15:35:12 +00:00
openmp [OMPT] Make sure that OMPT is enabled when accessing internals of the runtime 2019-01-30 08:41:06 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
pstl Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

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