llvm-project/llvm/lib/Transforms
Davide Italiano 824d695231 [SCCP] Teach the pass about `mul %x 0` even if %x is overdefined.
The motivating example is:

extern int patatino;
int goo() {
    int x = 0;
    for (int i = 0; i < 1000000; ++i) {
        x *= patatino;
    }
    return x;
}

Currently SCCP will not realize that this function returns always zero,
therefore will try to unroll and vectorize the loop at -O3 producing an
awful lot of (useless) code. With this change, it will just produce:

0000000000000000 <g>:
   xor    %eax,%eax
   retq

llvm-svn: 289175
2016-12-09 03:08:42 +00:00
..
Coroutines Fix spelling mistakes in Transforms comments. NFC. 2016-11-20 13:19:49 +00:00
Hello Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
IPO WholeProgramDevirt: Teach the pass to handle structs of arrays. 2016-12-09 01:10:11 +00:00
InstCombine [InstCombine] change select type to eliminate bitcasts 2016-12-03 15:25:16 +00:00
Instrumentation [sanitizer-coverage] use IRB.SetCurrentDebugLocation after IRB.SetInsertPoint 2016-12-03 01:43:30 +00:00
ObjCARC [CMake] NFC. Updating CMake dependency specifications 2016-11-17 04:36:50 +00:00
Scalar [SCCP] Teach the pass about `mul %x 0` even if %x is overdefined. 2016-12-09 03:08:42 +00:00
Utils [InlineFunction] Refactor code in function `fixupLineNumbers' as suggested by David in D27462. NFC 2016-12-07 12:01:45 +00:00
Vectorize [SLP] Fix for PR6246: vectorization for scalar ops on vector elements. 2016-12-08 11:57:51 +00:00
CMakeLists.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00
LLVMBuild.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00