1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
Go to file
Yi-Hong Lyu 886fba1618 [CGP] Make ICMP_EQ use CR result of ICMP_S(L|G)T dominators
For example:

long long test(long long a, long long b) {
  if (a << b > 0)
    return b;
  if (a << b < 0)
    return a;
  return a*b;
}

Produces:

        sld. 5, 3, 4
        ble 0, .LBB0_2
        mr 3, 4
        blr
.LBB0_2:                                # %if.end
        cmpldi  5, 0
        li 5, 1
        isel 4, 4, 5, 2
        mulld 3, 4, 3
        blr

But the compare (cmpldi 5, 0) is redundant and can be removed (CR0 already
contains the result of that comparison).

The root cause of this is that LLVM converts signed comparisons into equality
comparison based on dominance. Equality comparisons are unsigned by default, so
we get either a record-form or cmp (without the l for logical) feeding a cmpl.
That is the situation we want to avoid here.

Differential Revision: https://reviews.llvm.org/D60506
2019-11-11 17:28:50 +00:00
benchmarks
bindings Update version number in llvm python bindings 2019-10-25 17:14:11 -04:00
cmake [cmake] Remove SVN support from VersionFromVCS.cmake 2019-11-08 09:59:42 -08:00
docs docs: fix warning in LangRef parsing 2019-11-11 10:45:42 +00:00
examples Break out OrcError and RPC 2019-10-29 17:31:28 -07:00
include [CGP] Make ICMP_EQ use CR result of ICMP_S(L|G)T dominators 2019-11-11 17:28:50 +00:00
lib [CGP] Make ICMP_EQ use CR result of ICMP_S(L|G)T dominators 2019-11-11 17:28:50 +00:00
projects Add few docs and implementation of strcpy and strcat. 2019-10-04 17:30:54 +00:00
resources
runtimes Adding support for overriding LLVM_ENABLE_RUNTIMES for runtimes builds. 2019-09-24 22:38:18 +00:00
test [CGP] Make ICMP_EQ use CR result of ICMP_S(L|G)T dominators 2019-11-11 17:28:50 +00:00
tools [yaml2obj] - Add a way to describe the custom data that is not part of an output section. 2019-11-11 11:48:23 +03:00
unittests [Support] Add erase() to json::Object 2019-11-11 18:25:28 +01:00
utils change LLVM_VERSION_SUFFIX default from svn to git 2019-11-11 09:10:20 -08:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes Fix the "git modified" issue on the preserve-comments-crlf.s. 2019-09-10 12:17:49 +00:00
.gitignore
CMakeLists.txt change LLVM_VERSION_SUFFIX default from svn to git 2019-11-11 09:10:20 -08:00
CODE_OWNERS.TXT Update email address in CODE_OWNERS 2019-07-01 16:01:15 +00:00
configure
CREDITS.TXT Update email address. 2019-07-17 07:02:02 +00:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
README.txt Test commit. 2019-10-03 14:57:49 +00:00
RELEASE_TESTERS.TXT

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.

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.