llvm-project/llvm
Yonghong Song d3b522f519 bpf: fix incorrect SELECT_CC lowering
Commit 37962a331c77 ("bpf: Improve expanding logic in LowerSELECT_CC")
intended to improve code quality for certain jmp conditions. The
commit, however, has a couple of issues:
  (1). In code, just swap is not enough, ConditionalCode CC
       should also be swapped, otherwise incorrect code will
       be generated.
  (2). The ConditionalCode swap should be subject to
       getHasJmpExt(). If getHasJmpExt() is False, certain
       conditional codes will not be supported and swap
       may generate incorrect code.

The original goal for this patch is to optimize jmp operations
which does not have JmpExt turned on. If JmpExt is on,
better code could be generated. For example, the test
select_ri.ll is introduced to demonstrate the optimization.
The same result can be achieved with -mcpu=v2 flag.

Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
llvm-svn: 329043
2018-04-03 03:56:37 +00:00
..
bindings Fix Go IR test for changes in DIBuilder API 2018-04-02 21:45:35 +00:00
cmake Remove some unused cmake standard library includes. 2018-04-02 17:52:19 +00:00
docs [coroutines] Add support for llvm.coro.noop intrinsics 2018-04-02 16:55:12 +00:00
examples [ORC] Create a new SymbolStringPool by default in ExecutionSession constructor. 2018-04-02 20:57:56 +00:00
include peel loops with runtime small trip counts 2018-04-03 03:39:43 +00:00
lib bpf: fix incorrect SELECT_CC lowering 2018-04-03 03:56:37 +00:00
projects
resources
runtimes
test bpf: fix incorrect SELECT_CC lowering 2018-04-03 03:56:37 +00:00
tools Remove llvm-mcmarkup. 2018-04-02 23:17:55 +00:00
unittests [ORC] Create a new SymbolStringPool by default in ExecutionSession constructor. 2018-04-02 20:57:56 +00:00
utils Remove utils/makellvm; it doesn't look like it works with cmake builds. 2018-04-03 02:37:49 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Assume existence of inttypes.h and stdint.h in DataTypes.h. 2018-04-02 13:22:26 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

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.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.