Go to file
Hiroshi Inoue e3a3e3c9e9 [PowerPC] Eliminate sign- and zero-extensions if already sign- or zero-extended
This patch enables redundant sign- and zero-extension elimination in PowerPC MI Peephole pass.
If the input value of a sign- or zero-extension is known to be already sign- or zero-extended, the operation is redundant and can be eliminated.
One common case is sign-extensions for a method parameter or for a method return value; they must be sign- or zero-extended as defined in PPC ELF ABI. 
For example of the following simple code, two extsw instructions are generated before the invocation of int_func and before the return. With this patch, both extsw are eliminated.

void int_func(int);
void ii_test(int a) {
    if (a & 1) return int_func(a);
}

Such redundant sign- or zero-extensions are quite common in many programs; e.g. I observed about 60,000 occurrences of the elimination while compiling the LLVM+CLANG.

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

llvm-svn: 315888
2017-10-16 04:12:57 +00:00
clang [Sema] Re-land: Diagnose tautological comparison with type's min/max values 2017-10-15 20:13:17 +00:00
clang-tools-extra [clang-tidy] Add a regression test for google-readability-namespace-comments 2017-10-13 14:11:14 +00:00
compiler-rt [asan] Increase kHandlerStackSize for TracerThreadSignalHandler 2017-10-15 04:18:29 +00:00
debuginfo-tests Revert r313600 due to bot failures on Green Dragon. 2017-09-19 14:51:37 +00:00
libclc travis: enable checks of nvptx libraries 2017-10-10 18:10:25 +00:00
libcxx Fix last_write_time.pass.cpp to work with clang-3.9 and earlier 2017-10-15 21:52:53 +00:00
libcxxabi Fix ASAN build with older compiler-rt versions. 2017-09-14 22:37:34 +00:00
libunwind libunwind: document tested FreeBSD configs and sort OS list 2017-10-14 17:04:04 +00:00
lld Remove Config::FirstElf. 2017-10-15 21:43:09 +00:00
lldb The save_crashlog command was still looking at lldb.target and 2017-10-12 02:21:41 +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 [PowerPC] Eliminate sign- and zero-extensions if already sign- or zero-extended 2017-10-16 04:12:57 +00:00
openmp KMP_HW_SUBSET vs KMP_PLACE_THREADS rival envirables fix 2017-10-06 19:23:19 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly Rename OptimizationDiagnosticInfo.h to OptimizationRemarkEmitter.h 2017-10-09 23:49:08 +00:00