~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/test/CodeGen/Generic/negintconst.ll

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc < %s
 
2
 
 
3
; Test that a negative constant smaller than 64 bits (e.g., int)
 
4
; is correctly implemented with sign-extension.
 
5
; In particular, the current code generated is:
 
6
;
 
7
; main:
 
8
; .L_main_LL_0:
 
9
;         save    %o6, -224, %o6
 
10
;         setx    .G_fmtArg_1, %o1, %o0
 
11
;         setuw   1, %o1                ! i = 1
 
12
;         setuw   4294967295, %o3       ! THE BUG: 0x00000000ffffffff
 
13
;         setsw   0, %i0
 
14
;         add     %i6, 1999, %o2        ! fval
 
15
;         add     %o1, %g0, %o1
 
16
;         add     %o0, 0, %o0
 
17
;         mulx    %o1, %o3, %o1         ! ERROR: 0xffffffff; should be -1
 
18
;         add     %o1, 3, %o1           ! ERROR: 0x100000002; should be 0x2
 
19
;         mulx    %o1, 12, %o3          ! 
 
20
;         add     %o2, %o3, %o3         ! produces bad address!
 
21
;         call    printf
 
22
;         nop     
 
23
;         jmpl    %i7+8, %g0
 
24
;         restore %g0, 0, %g0
 
25
 
26
;   llc produces:
 
27
; ioff = 2        fval = 0xffffffff7fffec90       &fval[2] = 0xb7fffeca8
 
28
;   instead of:
 
29
; ioff = 2        fval = 0xffffffff7fffec90       &fval[2] = 0xffffffff7fffeca8
 
30
 
31
        %Results = type { float, float, float }
 
32
@fmtArg = internal global [39 x i8] c"ioff = %u\09fval = 0x%p\09&fval[2] = 0x%p\0A\00"          ; <[39 x i8]*> [#uses=1]
 
33
 
 
34
declare i32 @printf(i8*, ...)
 
35
 
 
36
define i32 @main() {
 
37
        %fval = alloca %Results, i32 4          ; <%Results*> [#uses=2]
 
38
        %i = add i32 1, 0               ; <i32> [#uses=1]
 
39
        %iscale = mul i32 %i, -1                ; <i32> [#uses=1]
 
40
        %ioff = add i32 %iscale, 3              ; <i32> [#uses=2]
 
41
        %ioff.upgrd.1 = zext i32 %ioff to i64           ; <i64> [#uses=1]
 
42
        %fptr = getelementptr %Results* %fval, i64 %ioff.upgrd.1                ; <%Results*> [#uses=1]
 
43
        %castFmt = getelementptr [39 x i8]* @fmtArg, i64 0, i64 0               ; <i8*> [#uses=1]
 
44
        call i32 (i8*, ...)* @printf( i8* %castFmt, i32 %ioff, %Results* %fval, %Results* %fptr )               ; <i32>:1 [#uses=0]
 
45
        ret i32 0
 
46
}
 
47