Old fork of llvm-mirror, used on older RPCS3 builds
Go to file
Evan Cheng de62192843 Throttle back "fold select into operand" transformation. InstCombine should not generate selects of two constants unless they are selects of 0 and 1.
e.g.
define i32 @t1(i32 %c, i32 %x) nounwind {
       %t1 = icmp eq i32 %c, 0
       %t2 = lshr i32 %x, 18
       %t3 = select i1 %t1, i32 %t2, i32 %x
       ret i32 %t3
}

was turned into

define i32 @t2(i32 %c, i32 %x) nounwind {
       %t1 = icmp eq i32 %c, 0
       %t2 = select i1 %t1, i32 18, i32 0
       %t3 = lshr i32 %x, %t2
       ret i32 %t3
}

For most targets, that means materializing two constants and then a select. e.g. On x86-64

movl    %esi, %eax
shrl    $18, %eax
testl   %edi, %edi
cmovne  %esi, %eax
ret

=>

xorl    %eax, %eax
testl   %edi, %edi
movl    $18, %ecx
cmovne  %eax, %ecx
movl    %esi, %eax
shrl    %cl, %eax
ret

Also, the optimizer and codegen can reason about shl / and / add, etc. by a constant. This optimization will hinder optimizations using ComputeMaskedBits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68142 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-31 20:42:45 +00:00
autoconf Revert r66765 and r66766. These were causing build failures on Darwin. 2009-03-12 04:10:09 +00:00
bindings Fix a parallel make race condition by swapping the order of -I directories. 2009-03-06 00:00:58 +00:00
cmake CMake: Build system fixes for XCode. llvm-config still causes us some serious trouble, but it's less serious than it used to be 2009-03-16 22:53:26 +00:00
docs docs/TestingGuide.html: correction to prev. text (objdir!=srcdir required for running test-suite), removed refs to llvm-test 2009-03-30 18:56:53 +00:00
examples reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an 2008-11-21 16:42:48 +00:00
include Reapply 68073, with fixes. EH Landing-pad basic blocks are not 2009-03-31 18:39:13 +00:00
lib Throttle back "fold select into operand" transformation. InstCombine should not generate selects of two constants unless they are selects of 0 and 1. 2009-03-31 20:42:45 +00:00
projects Revert r67655 and r67656, as they are breaking the build. I'm 2009-03-25 00:52:11 +00:00
runtime Drop toy GC runtime. 2009-03-02 03:46:48 +00:00
test Throttle back "fold select into operand" transformation. InstCombine should not generate selects of two constants unless they are selects of 0 and 1. 2009-03-31 20:42:45 +00:00
tools Do not pass '-relocation-model=pic' to llc. 2009-03-31 18:33:54 +00:00
unittests Converted a1.ll to unittests. 2009-03-24 21:36:09 +00:00
utils Tidy up some comments. 2009-03-31 16:48:35 +00:00
website
win32 Update hand-crafted VC++ build. 2009-02-02 19:22:02 +00:00
Xcode
build-for-llvm-top.sh Patch to build llvm with srcdir != objdir from 2009-01-23 08:42:38 +00:00
CMakeLists.txt Fix the Win32 VS2008 build: 2009-03-19 23:26:52 +00:00
configure Revert r66765 and r66766. These were causing build failures on Darwin. 2009-03-12 04:10:09 +00:00
CREDITS.TXT Adding your's truly to CREDITS.TXT 2009-01-19 15:04:29 +00:00
LICENSE.TXT Another great year for LLVM! 2009-02-26 15:17:13 +00:00
llvm.spec.in
Makefile Add ccc back for now. 2009-03-30 17:43:04 +00:00
Makefile.common Removed trailing whitespace from Makefiles. 2009-01-09 16:44:42 +00:00
Makefile.config.in Autodetect the availability of -export-dynamic in the linker. 2009-03-05 08:20:21 +00:00
Makefile.rules Fix build on MacOS 10.4 systems (suggested by Mike Smith). 2009-03-27 18:18:00 +00:00
ModuleInfo.txt Patch to build llvm with srcdir != objdir from 2009-01-23 08:42:38 +00:00
README.txt README.txt: test commit w/blank line appended 2009-03-23 21:00:45 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level 
Virtual Machine, 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 HTML documentation provided in docs/index.html for further
assistance with LLVM.