llvm-6502/test
Chris Lattner 2e61849f45 fix a small oversight in the "eliminate memcpy from constant global"
optimization.  If the alloca that is "memcpy'd from constant" also has
a memcpy from *it*, ignore it: it is a load.  We now optimize the testcase to:

define void @test2() {
  %B = alloca %T
  %a = bitcast %T* @G to i8*
  %b = bitcast %T* %B to i8*
  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %b, i8* %a, i64 124, i32 4, i1 false)
  call void @bar(i8* %b)
  ret void
}

previously we would generate:

define void @test() {
  %B = alloca %T
  %b = bitcast %T* %B to i8*
  %G.0 = getelementptr inbounds %T* @G, i32 0, i32 0
  %tmp3 = load i8* %G.0, align 4
  %G.1 = getelementptr inbounds %T* @G, i32 0, i32 1
  %G.15 = bitcast [123 x i8]* %G.1 to i8*
  %1 = bitcast [123 x i8]* %G.1 to i984*
  %srcval = load i984* %1, align 1
  %B.0 = getelementptr inbounds %T* %B, i32 0, i32 0
  store i8 %tmp3, i8* %B.0, align 4
  %B.1 = getelementptr inbounds %T* %B, i32 0, i32 1
  %B.12 = bitcast [123 x i8]* %B.1 to i8*
  %2 = bitcast [123 x i8]* %B.1 to i984*
  store i984 %srcval, i984* %2, align 1
  call void @bar(i8* %b)
  ret void
}



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119682 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-18 06:20:47 +00:00
..
Analysis Delete unneeded ssp attributes. 2010-11-11 21:08:46 +00:00
Archive
Assembler
Bindings/Ocaml
Bitcode Testcase for PR8494 (invalid bitcode crashing the bitcode reader). 2010-10-28 15:57:30 +00:00
BugPoint
CodeGen Change CodeGen to use .loc directives. This produces a lot more readable output 2010-11-18 02:04:25 +00:00
DebugInfo Change CodeGen to use .loc directives. This produces a lot more readable output 2010-11-18 02:04:25 +00:00
ExecutionEngine lli: Switch to using ParseIRFile, for consistency with other LLVM tools. 2010-11-13 00:28:01 +00:00
Feature
FrontendAda
FrontendC Test for llvm-gcc patch 119392. 2010-11-16 21:57:15 +00:00
FrontendC++
FrontendFortran
FrontendObjC
FrontendObjC++ Temporarily revert r117079; it broke a tester. Radar 6635085. 2010-10-22 18:44:22 +00:00
Integer
lib
Linker Fix PR8300 by remembering to keep the bitcast in all cases. 2010-10-19 02:02:57 +00:00
LLVMC Remove -llvmc-temp-hack from tblgen. 2010-10-23 07:32:53 +00:00
MC Try again at providing Thumb2 encodings for basic multiplication operators. 2010-11-18 01:08:42 +00:00
Other Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
Scripts test/Scripts/macho-dump: Make hack for Python-2.4. [PR7995] 2010-10-29 01:14:16 +00:00
TableGen
Transforms fix a small oversight in the "eliminate memcpy from constant global" 2010-11-18 06:20:47 +00:00
Unit
Verifier
CMakeLists.txt CMake: Add the new option "LLVM_LIT_ARGS". 2010-11-11 04:09:35 +00:00
lit.cfg
lit.site.cfg.in
Makefile test/Makefile: Force lit -j1 on Cygwin. 2010-10-22 09:40:37 +00:00
Makefile.tests
site.exp.in
TestRunner.sh