~ubuntu-branches/ubuntu/saucy/clamav/saucy

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/test/Analysis/BasicAA/2003-02-26-AccessSizeTest.ll

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-04-11 19:58:58 UTC
  • Revision ID: james.westby@ubuntu.com-20100411195858-exax6ky1jyzpa1h7
Tags: 0.96+dfsg-1ubuntu1
* Merge from Debian Unstable.  Remaining Ubuntu changes:
  - Drop initial signature definitions from clamav-base
  - Drop build-dep on electric-fence (in Universe)
  - Add apparmor profiles for clamd and freshclam along with maintainer
    script changes
* Adjust debconf processing for new option to the default priority procuces
  valid configuration files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
; This testcase makes sure that size is taken to account when alias analysis 
2
 
; is performed.  It is not legal to delete the second load instruction because
3
 
; the value computed by the first load instruction is changed by the store.
4
 
 
5
 
; RUN: opt < %s -gvn -instcombine -S | grep DONOTREMOVE
6
 
 
7
 
define i32 @test() {
8
 
        %A = alloca i32
9
 
        store i32 0, i32* %A
10
 
    %X = load i32* %A
11
 
    %B = bitcast i32* %A to i8*
12
 
    %C = getelementptr i8* %B, i64 1
13
 
        store i8 1, i8* %C    ; Aliases %A
14
 
    %Y.DONOTREMOVE = load i32* %A
15
 
        %Z = sub i32 %X, %Y.DONOTREMOVE
16
 
    ret i32 %Z
17
 
}
18