Files
archived-llvm/test/CodeGen/Generic/print-shift.ll
John Criswell cfa435f79b Mark these as failing on sparc instead of sparcv9.
The configure script no longer tells us that we're configuring for SparcV9
specifically.
2004-06-17-UnorderedCompares may work on SparcV8, but it's experiental
anyway.
2005-02-20-AggregateSAVEEXPR should fail on any Solaris machine, as Solaris
doesn't provide complex number support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_16@24155 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02 18:05:50 +00:00

36 lines
985 B
LLVM

; RUN: llvm-as < %s | llc
%a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
%b_str = internal constant [8 x sbyte] c"b = %d\0A\00"
;; shl
%a_shl_str = internal constant [14 x sbyte] c"a << %d = %d\0A\00"
declare int %printf(sbyte*, ...)
%A = global int 2
%B = global int 5
int %main() {
entry:
%a = load int* %A
%b = load int* %B
%a_s = getelementptr [8 x sbyte]* %a_str, long 0, long 0
%b_s = getelementptr [8 x sbyte]* %b_str, long 0, long 0
%a_shl_s = getelementptr [14 x sbyte]* %a_shl_str, long 0, long 0
call int (sbyte*, ...)* %printf(sbyte* %a_s, int %a)
call int (sbyte*, ...)* %printf(sbyte* %b_s, int %b)
br label %shl_test
shl_test:
;; test left shifts 0-31
%s = phi ubyte [ 0, %entry ], [ %s_inc, %shl_test ]
%result = shl int %a, ubyte %s
call int (sbyte*, ...)* %printf(sbyte* %a_shl_s, ubyte %s, int %result)
%s_inc = add ubyte %s, 1
%done = seteq ubyte %s, 32
br bool %done, label %fini, label %shl_test
fini:
ret int 0
}