llvm/lib
Bill Wendling df303bd7f2 Chris and Evan noticed that this check was compleatly fubared. I was
checking that there was a from a global instead of a load from the stub
for a global, which is the one that's safe to hoist.

Consider this program:

volatile char G[100];
int B(char *F, int N) {
  for (; N > 0; --N)
    F[N] = G[N];
}

In static mode, we shouldn't be hoisting the load from G:

$ llc -relocation-model=static -o - a.bc -march=x86 -machine-licm

LBB1_1: # bb.preheader
        leal    -1(%eax), %edx
        testl   %edx, %edx
        movl    $1, %edx
        cmovns  %eax, %edx
        xorl    %esi, %esi
LBB1_2: # bb
        movb    _G(%eax), %bl
        movb    %bl, (%ecx,%eax)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45626 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-05 09:18:04 +00:00
..
Analysis Don't be rude, emit debugging info where asked to. 2008-01-02 02:49:20 +00:00
Archive Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
AsmParser Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
Bitcode Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
CodeGen The current impl is really trivial, add some comments about how it can be made better. 2008-01-05 06:47:58 +00:00
Debugger Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
ExecutionEngine X86 JIT PIC jumptable support. 2008-01-05 02:26:58 +00:00
Linker Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
Support Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
System Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
Target Chris and Evan noticed that this check was compleatly fubared. I was 2008-01-05 09:18:04 +00:00
Transforms remove a couple more unsafe xforms in the face of overflow. 2008-01-05 01:22:42 +00:00
VMCore Trying that again. 2008-01-03 03:32:33 +00:00
Makefile remove attribution from lib Makefiles. 2007-12-29 20:09:26 +00:00