Go to file
Chandler Carruth 5ecd81aab0 [x86][eflags] Fix PR37431 by teaching the EFLAGS copy lowering to
specially handle SETB_C* pseudo instructions.

Summary:
While the logic here is somewhat similar to the arithmetic lowering, it
is different enough that it made sense to have its own function.
I actually tried a bunch of different optimizations here and none worked
well so I gave up and just always do the arithmetic based lowering.

Looking at code from the PR test case, we actually pessimize a bunch of
code when generating these. Because SETB_C* pseudo instructions clobber
EFLAGS, we end up creating a bunch of copies of EFLAGS to feed multiple
SETB_C* pseudos from a single set of EFLAGS. This in turn causes the
lowering code to ruin all the clever code generation that SETB_C* was
hoping to achieve. None of this is needed. Whenever we're generating
multiple SETB_C* instructions from a single set of EFLAGS we should
instead generate a single maximally wide one and extract subregs for all
the different desired widths. That would result in substantially better
code generation. But this patch doesn't attempt to address that.

The test case from the PR is included as well as more directed testing
of the specific lowering pattern used for these pseudos.

Reviewers: craig.topper

Subscribers: sanjoy, mcrosier, llvm-commits, hiraditya

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

llvm-svn: 332389
2018-05-15 20:16:57 +00:00
clang Fixed some rtti-options tests. 2018-05-15 18:28:42 +00:00
clang-tools-extra add AR to acronyms of clang-tidy property check 2018-05-15 18:13:51 +00:00
compiler-rt [sanitizer] Intercept __pthread_mutex_lock and __pthread_mutex_unlock 2018-05-15 01:39:25 +00:00
debuginfo-tests [Darwin] Specify DWARF 2/4 when running apple accelerator tests. 2018-02-26 20:56:45 +00:00
libclc rootn: Use denormal path only 2018-05-15 04:22:43 +00:00
libcxx Update XFAIL so apple-clang-9.0 is the last version not implementing Core 2094. 2018-05-14 19:45:24 +00:00
libcxxabi Fix test failure for missing _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS 2018-05-03 12:44:27 +00:00
libunwind [cmake] Remove duplicate command line options from build 2018-04-05 20:27:50 +00:00
lld [lld] Mitigate relocation overflow [part 1 of 2]. 2018-05-15 17:02:35 +00:00
lldb Reapply "Remove Process references from the Host module" 2018-05-15 13:42:26 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [x86][eflags] Fix PR37431 by teaching the EFLAGS copy lowering to 2018-05-15 20:16:57 +00:00
openmp [OpenMP][libomptarget] Add function for checking SPMD mode 2018-05-15 15:16:43 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [SI] Create Scop Name lazily 2018-05-15 14:53:25 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +00:00

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.