llvm.org GIT mirror llvm / fea1dd0
Remove obsolete -f flags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79992 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 10 years ago
369 changed file(s) with 406 addition(s) and 406 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 ; This testcase failed due to a bad assertion in SymbolTable.cpp, removed in
33 ; the 1.20 revision. Basically the symbol table assumed that if there was an
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 ; This testcase used to fail due to a lack of this diff in Value.cpp:
33 ; diff -r1.16 Value.cpp
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 %Hosp = type { i32, i32, i32, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* }, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* }, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* }, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* } }
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 ; Method arguments were being checked for collisions at the global scope before
33 ; the method object was created by the parser. Because of this, false
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 ; Another name collision problem. Here the problem was that if a forward
33 ; declaration for a method was found, that this would cause spurious conflicts
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 type { { \2 *, \4 ** },
33 { \2 *, \4 ** }
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 %t = type { { \2*, \2 },
33 { \2*, \2 }
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 %Hosp = type { { \2*, { \2, %Hosp }* }, { \2*, { \2, %Hosp }* } }
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11 ; It looks like the assembler is not forward resolving the function declaraion
22 ; correctly.
33
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 %T = type i32 *
33
0 ; This file takes about 48 __MINUTES__ to assemble using as. This is WAY too
11 ; long. The type resolution code needs to be sped up a lot.
2 ; RUN: llvm-as %s -o /dev/null -f
2 ; RUN: llvm-as %s -o /dev/null
33 %ALL_INTERSECTIONS_METHOD = type i32 (%OBJECT*, %RAY*, %ISTACK*)*
44 %BBOX = type { %BBOX_VECT, %BBOX_VECT }
55 %BBOX_TREE = type { i16, i16, %BBOX, %BBOX_TREE** }
0 ; Make sure we don't get an assertion failure, even though this is a parse
11 ; error
2 ; RUN: not llvm-as %s -o /dev/null -f |& grep {'@foo' defined with}
2 ; RUN: not llvm-as %s -o /dev/null |& grep {'@foo' defined with}
33
44 %ty = type void (i32)
55
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 define void @test(i32 %X) {
33 call void @test( i32 6 )
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 @.LC0 = internal global [12 x i8] c"hello world\00" ; <[12 x i8]*> [#uses=1]
33
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 @.LC0 = internal global [12 x i8] c"hello world\00" ; <[12 x i8]*> [#uses=1]
33
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 ; Dominance relationships is not calculated correctly for unreachable blocks,
33 ; which causes the verifier to barf on this input.
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11 ; This testcase comes from the following really simple c file:
22 ;; int foo[30000]
33 ;;; We should not be soo slow for such a simple case!
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 declare i32 @"ArrayRef"([100 x i32] * %Array)
33
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 @X = external global i32*
33 @X1 = external global %T*
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 @spell_order = global [4 x i8] c"\FF\00\F7\00"
33
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11 ; There should be absolutely no problem with this testcase.
22
33 define i32 @test(i32 %arg1, i32 %arg2) {
0 ; This bug was caused by two CPR's existing for the same global variable,
11 ; colliding in the Module level CPR map.
2 ; RUN: llvm-as %s -o /dev/null -f
2 ; RUN: llvm-as %s -o /dev/null
33
44 define void @test() {
55 call void (...)* bitcast (void (i16*, i32)* @AddString to void (...)*)( i16* null, i32 0 )
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 ; Check minimal switch statement
33
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11 ; Test that shift instructions can be used in constant expressions.
22
33 global i32 3670016
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 ; The old C front-end never generated empty structures, now the new one
33 ; can. For some reason we never handled them in the parser. Weird.
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 %MidFnTy = type void (%MidFnTy*)
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 %T = type i32
33 @X = global i32* null ; [#uses=0]
None ; RUN: not llvm-as %s -o /dev/null -f |& grep {use of undefined type named 'struct.D_Scope'}
0 ; RUN: not llvm-as %s -o /dev/null |& grep {use of undefined type named 'struct.D_Scope'}
11 ; END.
22
33 @d_reduction_0_dparser_gram = global {
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 ; %inc2 uses it's own value, but that's ok, as it's unreachable!
33
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 define i32* @t1({ float, i32 }* %X) {
33 %W = getelementptr { float, i32 }* %X, i32 20, i32 1 ; [#uses=0]
0 ;; The bytecode writer was trying to treat undef values as ConstantArray's when
11 ;; they looked like strings.
2 ;; RUN: llvm-as %s -o /dev/null -f
2 ;; RUN: llvm-as %s -o /dev/null
33 @G = internal global [8 x i8] undef
44
0 ; Test for PR463. This program is erroneous, but should not crash llvm-as.
1 ; RUN: not llvm-as %s -o /dev/null -f |& grep {invalid type for null constant}
1 ; RUN: not llvm-as %s -o /dev/null |& grep {invalid type for null constant}
22
33 @.FOO = internal global %struct.none zeroinitializer
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 define void @test() {
33 call {i32} @foo()
0 ; The assembler should catch an undefined argument type .
1 ; RUN: not llvm-as %s -o /dev/null -f |& grep {use of undefined type named 'typedef.bc_struct'}
1 ; RUN: not llvm-as %s -o /dev/null |& grep {use of undefined type named 'typedef.bc_struct'}
22
33 ; %typedef.bc_struct = type opaque
44
0 ; Test Case for PR1080
1 ; RUN: llvm-as %s -o /dev/null -f
1 ; RUN: llvm-as %s -o /dev/null
22
33 @str = internal constant [4 x i8] c"-ga\00" ; <[4 x i8]*> [#uses=2]
44
0 ; PR1117
1 ; RUN: not llvm-as %s -o /dev/null -f |& grep {invalid cast opcode for cast from}
1 ; RUN: not llvm-as %s -o /dev/null |& grep {invalid cast opcode for cast from}
22
33 define i8* @nada(i64 %X) {
44 %result = trunc i64 %X to i8*
0 ; PR1117
1 ; RUN: not llvm-as %s -o /dev/null -f |& grep {invalid cast opcode for cast from}
1 ; RUN: not llvm-as %s -o /dev/null |& grep {invalid cast opcode for cast from}
22
33 @X = constant i8* trunc (i64 0 to i8*)
0 ; PR 1258
1 ; RUN: not llvm-as < %s >/dev/null -f |& grep {'%0' defined with type 'i1'}
1 ; RUN: not llvm-as < %s >/dev/null |& grep {'%0' defined with type 'i1'}
22
33 define i32 @test1(i32 %a, i32 %b) {
44 entry:
0 ; Test function notes
1 ; RUN: not llvm-as %s -o /dev/null -f |& grep "Attributes noinline alwaysinline are incompatible"
1 ; RUN: not llvm-as %s -o /dev/null |& grep "Attributes noinline alwaysinline are incompatible"
22 define void @fn1() alwaysinline noinline {
33 ret void
44 }
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 @foo = global i32 0
33 @bar = constant i32* getelementptr(i32* @foo)
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22
33 define i32 @test(i1 %C, i32 %V1, i32 %V2) {
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11
22 define void @test(i32* %P, i32* %Q) {
33 entry:
None ; RUN: llvm-as < %s | llvm-dis -f -o /dev/null
0 ; RUN: llvm-as < %s | llvm-dis -o /dev/null
11 type { %object.ModuleInfo.__vtbl*, i8*, %"byte[]", %1, %"ClassInfo[]", i32, void ()*, void ()*, void ()*, i8*, void ()* } ; type %0
22 type { i64, %object.ModuleInfo* } ; type %1
33 type { i32, void ()* } ; type %2
None ; RUN: llvm-as < %s | llvm-dis -f -o /dev/null
0 ; RUN: llvm-as < %s | llvm-dis -o /dev/null
11
22 !llvm.foo = !{!0}
33 !0 = metadata !{i32 42}
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=arm-linux-gnueabi -o %t -f
1 ; RUN: llc -mtriple=arm-linux-gnueabi -o %t
22 ; RUN: grep set %t | count 5
33 ; RUN: grep globl %t | count 4
44 ; RUN: grep weak %t | count 1
0 ;test all the shifted and signextending adds and subs with and without consts
11 ;
2 ; RUN: llvm-as < %s | llc -march=alpha -o %t.s -f
2 ; RUN: llvm-as < %s | llc -march=alpha -o %t.s
33 ; RUN: grep { addl} %t.s | count 2
44 ; RUN: grep { addq} %t.s | count 2
55 ; RUN: grep { subl} %t.s | count 2
None ; RUN: llvm-as < %s | llc -march=cpp -cppgen=program -f -o %t
0 ; RUN: llvm-as < %s | llc -march=cpp -cppgen=program -o %t
11
22 define x86_fp80 @some_func() nounwind {
33 entry:
None ; RUN: llvm-as < %s | llc -march=cpp -cppgen=program -f -o %t
0 ; RUN: llvm-as < %s | llc -march=cpp -cppgen=program -o %t
11 ; RUN: grep "BranchInst::Create(label_if_then, label_if_end, int1_cmp, label_entry);" %t
22
33 define i32 @some_func(i32 %a) nounwind {
None ; RUN: llvm-as -o - %s | llc -march=cellspu -f -o %t1.s
0 ; RUN: llvm-as -o - %s | llc -march=cellspu -o %t1.s
11 ; RUN: grep rot %t1.s | count 85
22 ; RUN: grep roth %t1.s | count 8
33 ; RUN: grep roti.*5 %t1.s | count 1
0 # Makefile for running ad-hoc custom LLVM tests
11 #
22 %.bc: %.ll
3 llvm-as -f $<
3 llvm-as $<
44
55 %.llc.s: %.bc
6 llc -f $< -o $@
6 llc $< -o $@
77
88 %.gcc.s: %.c
99 gcc -O0 -S $< -o $@
None ; RUN: llvm-as < %s | llc -o /dev/null -f
0 ; RUN: llvm-as < %s | llc -o /dev/null
11
22 ; Test that select of a select works
33
None ; RUN: llvm-as < %s | llc -march=x86 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -o %t
11 ; RUN: grep jb %t | count 1
22 ; RUN: grep \\\$6 %t | count 2
33 ; RUN: grep 1024 %t | count 1
None ; RUN: llvm-as < %s | llc -march=mips -f -o %t
0 ; RUN: llvm-as < %s | llc -march=mips -o %t
11 ; RUN: grep subu %t | count 2
22 ; RUN: grep addu %t | count 4
33
None ; RUN: llvm-as < %s | llc -march=mips -f -o %t
0 ; RUN: llvm-as < %s | llc -march=mips -o %t
11 ; RUN: grep __floatsidf %t | count 1
22 ; RUN: grep __floatunsidf %t | count 1
33 ; RUN: grep __fixdfsi %t | count 1
None ; RUN: llvm-as < %s | llc -march=mips -f -o %t
0 ; RUN: llvm-as < %s | llc -march=mips -o %t
11 ; RUN: grep {rodata.str1.4,"aMS",@progbits} %t | count 1
22 ; RUN: grep {r.data,} %t | count 1
33 ; RUN: grep {\%hi} %t | count 2
None ; RUN: llvm-as < %s | llc -mips-ssection-threshold=8 -march=mips -f -o %t0
1 ; RUN: llvm-as < %s | llc -mips-ssection-threshold=0 -march=mips -f -o %t1
0 ; RUN: llvm-as < %s | llc -mips-ssection-threshold=8 -march=mips -o %t0
1 ; RUN: llvm-as < %s | llc -mips-ssection-threshold=0 -march=mips -o %t1
22 ; RUN: grep {sdata} %t0 | count 1
33 ; RUN: grep {sbss} %t0 | count 1
44 ; RUN: grep {gp_rel} %t0 | count 2
None ; RUN: llvm-as < %s | llc -march=mips -f -o %t
0 ; RUN: llvm-as < %s | llc -march=mips -o %t
11 ; RUN: grep seh %t | count 1
22 ; RUN: grep seb %t | count 1
33
None ; RUN: llvm-as < %s | llc -march=mips -f -o %t
0 ; RUN: llvm-as < %s | llc -march=mips -o %t
11 ; RUN: grep {CPI\[01\]_\[01\]:} %t | count 2
22 ; RUN: grep {rodata.cst4,"aM",@progbits} %t | count 1
33 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
None ; RUN: llvm-as < %s | llc -march=mips -f -o %t
0 ; RUN: llvm-as < %s | llc -march=mips -o %t
11 ; RUN: grep {c\\..*\\.s} %t | count 3
22 ; RUN: grep {bc1\[tf\]} %t | count 3
33
None ; RUN: llvm-as < %s | llc -march=mips -f -o %t
0 ; RUN: llvm-as < %s | llc -march=mips -o %t
11 ; RUN: grep abs.s %t | count 1
22 ; RUN: grep neg.s %t | count 1
33
None ; RUN: llvm-as < %s | llc -march=mips -f -o %t
0 ; RUN: llvm-as < %s | llc -march=mips -o %t
11 ; RUN: grep mfhi %t | count 1
22 ; RUN: grep mflo %t | count 1
33 ; RUN: grep multu %t | count 1
None ; RUN: llvm-as < %s | llc -march=mips -f -o %t
0 ; RUN: llvm-as < %s | llc -march=mips -o %t
11 ; RUN: grep {lui.*32767} %t | count 1
22 ; RUN: grep {ori.*65535} %t | count 1
33
None ; RUN: llvm-as < %s | llc -march=mips -f -o %t
0 ; RUN: llvm-as < %s | llc -march=mips -o %t
11 ; RUN: grep mtc1 %t | count 1
22 ; RUN: grep mfc1 %t | count 1
33
None ; RUN: llvm-as < %s | llc -march=mips -f
0 ; RUN: llvm-as < %s | llc -march=mips
11 ; Mips must ignore fastcc
22
33 target datalayout =
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -o %t1 -f
1 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -o %t1
22 ; RUN not grep {stw r31, 20(r1)} %t1
33 ; RUN: grep {stwu r1, -16448(r1)} %t1
44 ; RUN: grep {addi r1, r1, 16448} %t1
66 ; RUN: not grep {lwz r31, 20(r1)}
77 ; RUN: llvm-as < %s | \
88 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim \
9 ; RUN: -o %t2 -f
9 ; RUN: -o %t2
1010 ; RUN: grep {stw r31, 20(r1)} %t2
1111 ; RUN: grep {stwu r1, -16448(r1)} %t2
1212 ; RUN: grep {addi r1, r1, 16448} %t2
1313 ; RUN: grep {lwz r31, 20(r1)} %t2
1414 ; RUN: llvm-as < %s | \
15 ; RUN: llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -o %t3 -f
15 ; RUN: llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -o %t3
1616 ; RUN: not grep {std r31, 40(r1)} %t3
1717 ; RUN: grep {stdu r1, -16496(r1)} %t3
1818 ; RUN: grep {addi r1, r1, 16496} %t3
1919 ; RUN: not grep {ld r31, 40(r1)} %t3
2020 ; RUN: llvm-as < %s | \
2121 ; RUN: llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim \
22 ; RUN: -o %t4 -f
22 ; RUN: -o %t4
2323 ; RUN: grep {std r31, 40(r1)} %t4
2424 ; RUN: grep {stdu r1, -16496(r1)} %t4
2525 ; RUN: grep {addi r1, r1, 16496} %t4
0 ; All of these should be codegen'd without loading immediates
1 ; RUN: llvm-as < %s | llc -march=ppc32 -o %t -f
1 ; RUN: llvm-as < %s | llc -march=ppc32 -o %t
22 ; RUN: grep addc %t | count 1
33 ; RUN: grep adde %t | count 1
44 ; RUN: grep addze %t | count 1
None ; RUN: llvm-as < %s | llc -march=ppc32 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=ppc32 -o %t
11 ; RUN: grep slwi %t
22 ; RUN: not grep addi %t
33 ; RUN: not grep rlwinm %t
0 ; All of these ands and shifts should be folded into rlwimi's
1 ; RUN: llvm-as < %s | llc -march=ppc32 -o %t -f
1 ; RUN: llvm-as < %s | llc -march=ppc32 -o %t
22 ; RUN: not grep mulhwu %t
33 ; RUN: not grep srawi %t
44 ; RUN: not grep add %t
0 ; All of these ands and shifts should be folded into rlwimi's
1 ; RUN: llvm-as < %s | llc -march=ppc32 -o %t -f
1 ; RUN: llvm-as < %s | llc -march=ppc32 -o %t
22 ; RUN: grep rlwimi %t | count 3
33 ; RUN: grep srwi %t | count 1
44 ; RUN: not grep slwi %t
0 ; All of these ands and shifts should be folded into rlwimi's
1 ; RUN: llvm-as < %s | llc -march=ppc32 -o %t -f
1 ; RUN: llvm-as < %s | llc -march=ppc32 -o %t
22 ; RUN: not grep and %t
33 ; RUN: not grep srawi %t
44 ; RUN: not grep srwi %t
0 ; All of these ands and shifts should be folded into rlw[i]nm instructions
1 ; RUN: llvm-as < %s | llc -march=ppc32 -o %t -f
1 ; RUN: llvm-as < %s | llc -march=ppc32 -o %t
22 ; RUN: not grep and %t
33 ; RUN: not grep srawi %t
44 ; RUN: not grep srwi %t
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=stfiwx -o %t1 -f
1 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=stfiwx -o %t1
22 ; RUN: grep stfiwx %t1
33 ; RUN: not grep r1 %t1
44 ; RUN: llvm-as < %s | \
55 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx \
6 ; RUN: -o %t2 -f
6 ; RUN: -o %t2
77 ; RUN: not grep stfiwx %t2
88 ; RUN: grep r1 %t2
99
0 ; All of these should be codegen'd without loading immediates
1 ; RUN: llvm-as < %s | llc -march=ppc32 -o %t -f
1 ; RUN: llvm-as < %s | llc -march=ppc32 -o %t
22 ; RUN: grep subfc %t | count 1
33 ; RUN: grep subfe %t | count 1
44 ; RUN: grep subfze %t | count 1
None ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 -o %t
11 ; RUN: grep vcmpeqfp. %t
22 ; RUN: not grep mfcr %t
33
0 ; Test that vectors are scalarized/lowered correctly.
11 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g3 | \
22 ; RUN: grep stfs | count 4
3 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 -o %t -f
3 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 -o %t
44 ; RUN: grep vspltw %t | count 2
55 ; RUN: grep vsplti %t | count 3
66 ; RUN: grep vsplth %t | count 1
None ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 -o %t
11 ; RUN: grep vrlw %t
22 ; RUN: not grep spr %t
33 ; RUN: not grep vrsave %t
None ; RUN: llvm-as < %s | llc -march=x86 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -o %t
11 ; RUN: not grep and %t
22 ; RUN: not grep shr %t
33 ; rdar://6661955
None ; RUN: llvm-as < %s | llc -o %t1 -f
0 ; RUN: llvm-as < %s | llc -o %t1
11 ; RUN: grep "subq.*\\\$72, \\\%rsp" %t1
22 ; RUN: grep "movaps \\\%xmm8, 32\\\(\\\%rsp\\\)" %t1
33 ; RUN: grep "movaps \\\%xmm7, 48\\\(\\\%rsp\\\)" %t1
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=i686-pc-linux-gnu -asm-verbose=false -o %t -f
1 ; RUN: llc -mtriple=i686-pc-linux-gnu -asm-verbose=false -o %t
22 ; RUN: grep set %t | count 7
33 ; RUN: grep globl %t | count 6
44 ; RUN: grep weak %t | count 1
None ; RUN: llvm-as < %s | llc -march=x86 -o %t1 -f
0 ; RUN: llvm-as < %s | llc -march=x86 -o %t1
11 ; RUN: grep "lock" %t1 | count 17
22 ; RUN: grep "xaddl" %t1 | count 4
33 ; RUN: grep "cmpxchgl" %t1 | count 13
None ; RUN: llvm-as < %s | llc -march=x86-64 -o %t -f -stats -info-output-file - | \
0 ; RUN: llvm-as < %s | llc -march=x86-64 -o %t -stats -info-output-file - | \
11 ; RUN: grep {asm-printer} | grep {Number of machine instrs printed} | grep 5
22 ; RUN: grep {leal 1(\%rsi),} %t
33
None ; RUN: llvm-as < %s | llc -march=x86 -mcpu=penryn -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=penryn -disable-mmx -o %t
11 ; RUN: grep unpcklpd %t | count 1
22 ; RUN: grep movapd %t | count 1
33 ; RUN: grep movaps %t | count 1
None ; RUN: llvm-as < %s | llc -march=x86-64 -mcpu=core2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86-64 -mcpu=core2 -o %t
11 ; RUN: not grep unpcklps %t
22
33 define i32 @foo() nounwind {
None ; RUN: llvm-as < %s | llc -march=x86-64 -f -o %t
0 ; RUN: llvm-as < %s | llc -march=x86-64 -o %t
11 ; RUN: grep inc %t | count 1
22 ; RUN: grep dec %t | count 2
33 ; RUN: grep addq %t | count 13
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse2 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse2 -disable-mmx -o %t
11 ; RUN: grep {call.*divdi3} %t | count 2
22
33
None ; RUN: llvm-as < %s | llc -o %t -f
0 ; RUN: llvm-as < %s | llc -o %t
11 ; RUN: grep __alloca %t | count 2
22 ; RUN: grep 4294967288 %t
33 ; RUN: grep {pushl %eax} %t
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse41 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse41 -o %t
11 ; RUN: grep xorps %t | count 1
22
33 ; Test that when we don't -enable-unsafe-fp-math, we don't do the optimization
88 %sub = fsub float %a, %b ; [#uses=1]
99 %neg = fsub float -0.000000e+00, %sub ; [#uses=1]
1010 ret float %neg
11 }
11 }
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f
1 ; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t
22 ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
33 ; RUN: grep piclabel %t | count 3
44 ; RUN: grep GOT %t | count 3
0 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \
1 ; RUN: -o %t -f
1 ; RUN: -o %t
22 ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
33 ; RUN: grep piclabel %t | count 3
44 ; RUN: grep GOTOFF %t | count 4
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f
1 ; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t
22 ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
33 ; RUN: grep piclabel %t | count 3
44 ; RUN: grep PLT %t | count 1
0 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \
1 ; RUN: -o %t -f
1 ; RUN: -o %t
22 ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
33 ; RUN: grep piclabel %t | count 3
44 ; RUN: grep PLT %t | count 1
0 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \
1 ; RUN: -o %t -f
1 ; RUN: -o %t
22 ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
33 ; RUN: grep piclabel %t | count 3
44 ; RUN: grep GOT %t | count 3
0 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \
1 ; RUN: -o %t -f
1 ; RUN: -o %t
22 ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
33 ; RUN: grep piclabel %t | count 3
44 ; RUN: grep GOTOFF %t | count 1
0 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \
1 ; RUN: -o %t -f
1 ; RUN: -o %t
22 ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
33 ; RUN: grep piclabel %t | count 3
44 ; RUN: grep PLT %t | count 6
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+mmx -o %t
11 ; RUN: not grep movq %t
22
33 ; Check that widening doesn't introduce a mmx register in this case when
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -mtriple=i386-apple-darwin -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -mtriple=i386-apple-darwin -o %t
11 ; RUN: not grep and %t
22 ; RUN: not grep psrldq %t
33 ; RUN: grep xorps %t
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse41 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse41 -o %t
11 ; RUN: grep extractps %t | count 1
22 ; RUN: grep pextrd %t | count 1
33 ; RUN: not grep pshufd %t
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2,-sse41 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2,-sse41 -o %t
11 ; RUN: grep movss %t | count 3
22 ; RUN: grep movhlps %t | count 1
33 ; RUN: grep pshufd %t | count 1
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t
11 ; RUN: grep movq %t | count 2
22
33 ; Used movq to load i64 into a v2i64 when the top i64 is 0.
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse41 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse41 -o %t
11
22 ; tests variable insert and extract of a 4 x i32
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t
11 ; RUN: grep pshufd %t | count 2
22
33 define <4 x float> @test(float %a) nounwind {
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t
11 ; RUN: grep movlhps %t | count 1
22 ; RUN: grep movq %t | count 2
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t
11 ; RUN: grep movss %t | count 1
22 ; RUN: grep movq %t | count 1
33 ; RUN: grep shufps %t | count 1
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t
11 ; RUN: grep unpcklps %t | count 1
22 ; RUN: grep pshufd %t | count 1
33 ; RUN: not grep {sub.*esp} %t
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse,-sse2 -mtriple=i386-apple-darwin -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse,-sse2 -mtriple=i386-apple-darwin -o %t
11 ; RUN: grep shufps %t | count 4
22 ; RUN: grep movaps %t | count 2
3 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -mtriple=i386-apple-darwin -o %t -f
3 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -mtriple=i386-apple-darwin -o %t
44 ; RUN: grep pshufd %t | count 4
55 ; RUN: not grep shufps %t
66 ; RUN: not grep mov %t
None ; RUN: llvm-as < %s | llc -march=x86 -mcpu=pentium-m -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=pentium-m -o %t
11 ; RUN: grep movlhps %t | count 1
22 ; RUN: grep pshufd %t | count 1
3 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=core2 -o %t -f
3 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=core2 -o %t
44 ; RUN: grep movlhps %t | count 1
55 ; RUN: grep movddup %t | count 1
66
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t
11 ; RUN: grep unpcklps %t | count 3
22 ; RUN: grep unpckhps %t | count 1
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t
11 ; RUN: grep unpcklps %t | count 1
22 ; RUN: grep unpckhps %t | count 3
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t
11 ; RUN: grep addps %t | count 2
22 ; RUN: grep mulps %t | count 2
33 ; RUN: grep subps %t | count 2
None ; RUN: llvm-as < %s | llc -march=x86 -mcpu=core2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=core2 -o %t
11 ; RUN: grep pshufb %t | count 1
22
33 ; FIXME: this test has a superfluous punpcklqdq pre-pshufb currently.
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t
11 ; RUN: grep movlhps %t | count 1
22 ; RUN: grep movhlps %t | count 1
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -disable-mmx -o %t
11 ; RUN: grep pshufhw %t | grep 161 | count 1
22 ; RUN: grep shufps %t | count 1
33 ; RUN: not grep pslldq %t
None ; RUN: llvm-as < %s | llc -march=x86 -mcpu=core2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=core2 -o %t
11 ; RUN: grep pshufb %t | count 1
22
33 define <8 x i16> @shuf3(<8 x i16> %T0, <8 x i16> %T1) nounwind readnone {
None ; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah -stack-alignment=16 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah -stack-alignment=16 -o %t
11 ; RUN: grep pextrw %t | count 13
22 ; RUN: grep pinsrw %t | count 14
33 ; RUN: grep rolw %t | count 13
44 ; RUN: not grep esp %t
55 ; RUN: not grep ebp %t
6 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=core2 -stack-alignment=16 -o %t -f
6 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=core2 -stack-alignment=16 -o %t
77 ; RUN: grep pshufb %t | count 3
88
99 define <16 x i8> @shuf1(<16 x i8> %T0) nounwind readnone {
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t
11 ; RUN: grep pshufb %t | count 1
22
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t
11 ; RUN: grep movhlps %t | count 1
22 ; RUN: grep shufps %t | count 1
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t
11 ; RUN: grep movapd %t | count 1
22 ; RUN: grep movaps %t | count 1
33 ; RUN: grep movups %t | count 2
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t
11 ; RUN: grep xorps %t | count 1
22 ; RUN: not grep shufps %t
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t
11 ; RUN: grep punpck %t | count 2
22 ; RUN: not grep pextrw %t
33
None ; RUN: llvm-as < %s | llc -march=x86 -mcpu=core2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=core2 -o %t
11 ; RUN: grep shufp %t | count 1
22 ; RUN: grep movupd %t | count 1
33 ; RUN: grep pshufhw %t | count 1
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t
11 ; RUN: grep punpcklwd %t | count 4
22 ; RUN: grep punpckhwd %t | count 4
33 ; RUN: grep "pshufd" %t | count 8
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t
11 ; RUN: grep punpcklbw %t | count 16
22 ; RUN: grep punpckhbw %t | count 16
33 ; RUN: grep "pshufd" %t | count 16
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse,+sse2 -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse,+sse2 -o %t
11 ; RUN: grep minss %t | grep CPI | count 2
22 ; RUN: grep CPI %t | not grep movss
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -disable-mmx -o %t
11 ; RUN: grep psllq %t | count 2
22 ; RUN: grep pslld %t | count 2
33 ; RUN: grep psllw %t | count 2
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -disable-mmx -o %t
11 ; RUN: grep psrlq %t | count 2
22 ; RUN: grep psrld %t | count 2
33 ; RUN: grep psrlw %t | count 2
6060 %lshr = lshr <8 x i16> %val, %7
6161 store <8 x i16> %lshr, <8 x i16>* %dst
6262 ret void
63 }
63 }
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -disable-mmx -o %t
11 ; RUN: grep psrad %t | count 2
22 ; RUN: grep psraw %t | count 2
33
5050 %ashr = ashr <8 x i16> %val, %7
5151 store <8 x i16> %ashr, <8 x i16>* %dst
5252 ret void
53 }
53 }
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -disable-mmx -o %t
11 ; RUN: grep psllq %t | count 1
22 ; RUN: grep pslld %t | count 3
33 ; RUN: grep psllw %t | count 2
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11 ; RUN: grep paddb %t | count 1
22 ; RUN: grep pextrb %t | count 1
33 ; RUN: not grep pextrw %t
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11 ; RUN: grep paddb %t | count 1
22 ; RUN: grep pand %t | count 1
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11 ; RUN: grep paddw %t | count 1
22 ; RUN: grep movd %t | count 2
33 ; RUN: grep pextrw %t | count 1
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11 ; RUN: grep psubw %t | count 1
22 ; RUN: grep pmullw %t | count 1
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11 ; RUN: grep pmulld %t | count 1
22 ; RUN: grep psubd %t | count 1
33 ; RUN: grep movaps %t | count 1
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11 ; RUN: grep mulps %t | count 1
22 ; RUN: grep addps %t | count 1
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11 ; RUN: grep paddw %t | count 1
22 ; RUN: grep movd %t | count 1
33 ; RUN: grep pextrd %t | count 1
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11 ; RUN: grep pextrd %t | count 5
22 ; RUN: grep movd %t | count 3
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11 ; RUN: grep paddd %t | count 1
22 ; RUN: grep pextrd %t | count 2
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11 ; RUN: grep sarb %t | count 8
22
33 ; v8i8 that is widen to v16i8 then split
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11
22 ; bitcast a i64 to v2i32
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse41 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse41 -disable-mmx -o %t
11 ; RUN: grep movd %t | count 1
22
33 ; Test bit convert that requires widening in the operand.
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11 ; RUN: grep pshufd %t | count 1
22 ; RUN: grep paddd %t | count 1
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11
22 ; sign extension v2i32 to v2i16
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11 ; grep cvtsi2ss %t | count 1
22 ; sign to float v2i16 to v2f32
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11
22 ; unsigned to float v7i16 to v7f32
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11
22 ; widening select v6i32 and then a sub
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11
22 ; widening shuffle v3float and then a add
33
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t -f
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse42 -disable-mmx -o %t
11
22 ; widening shuffle v3float and then a add
33
None ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin -o %t1 -f
0 ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin -o %t1
11 ; RUN: grep GOTPCREL %t1 | count 4
22 ; RUN: grep %%rip %t1 | count 6
33 ; RUN: grep movq %t1 | count 6
44 ; RUN: grep leaq %t1 | count 1
55 ; RUN: llvm-as < %s | \
6 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=static -o %t2 -f
6 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=static -o %t2
77 ; RUN: grep movl %t2 | count 2
88 ; RUN: grep movq %t2 | count 2
99
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1 -f
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
22 ; RUN: grep {call f@PLT} %t1
33
44 define void @g() {
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1 -f
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
22 ; RUN: grep {call g@PLT} %t1
33
44 @g = alias weak i32 ()* @f
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1 -f
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
22 ; RUN: grep {call __fixunsxfti@PLT} %t1
33
44 define i128 @f(x86_fp80 %a) nounwind {
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1 -f
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
22 ; RUN: grep {call f} %t1
33 ; RUN: not grep {call f@PLT} %t1
44
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1 -f
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
22 ; RUN: grep {call f} %t1
33 ; RUN: not grep {call f@PLT} %t1
44
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1 -f
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
22 ; RUN: grep {movq a@GOTPCREL(%rip),} %t1
33
44 @a = global i32 0
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1 -f
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
22 ; RUN: grep {movl a(%rip),} %t1
33 ; RUN: not grep GOTPCREL %t1
44
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1 -f
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
22 ; RUN: grep {movl a(%rip),} %t1
33 ; RUN: not grep GOTPCREL %t1
44
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1 -f
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
22 ; RUN: grep {movq f@GOTPCREL(%rip),} %t1
33
44 define void ()* @g() nounwind {
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1 -f
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
22 ; RUN: grep {leaq f(%rip),} %t1
33 ; RUN: not grep GOTPCREL %t1
44
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1 -f
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
22 ; RUN: grep {leaq f(%rip),} %t1
33 ; RUN: not grep GOTPCREL %t1
44
None ; RUN: llvm-as < %s | llc -f -o /dev/null -verify-dom-info
0 ; RUN: llvm-as < %s | llc -o /dev/null -verify-dom-info
11 %llvm.dbg.anchor.type = type { i32, i32 }
22 %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32, i8*, i8* }
33 %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8* }
0
1 ; RUN: llvm-as < %s | llc -f -o /dev/null
1 ; RUN: llvm-as < %s | llc -o /dev/null
22 ; XFAIL: powerpc
33
44 target triple = "powerpc-apple-darwin9.5"
None ; RUN: llvm-as < %s | llc -f -o /dev/null
0 ; RUN: llvm-as < %s | llc -o /dev/null
11 %llvm.dbg.anchor.type = type { i32, i32 }
22 %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32, i8*, i8* }
33 %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8* }
2626 @llvm.dbg.composite11 = internal constant %llvm.dbg.composite.type { i32 458771, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([2 x i8]* @.str3, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 3, i64 64, i64 32, i64 0, i32 0, { }* null, { }* bitcast ([2 x { }*]* @llvm.dbg.array to { }*), i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1, i32 0, i32 0) }, section "llvm.metadata" ; <%llvm.dbg.composite.type*> [#uses=1]
2727 @llvm.dbg.global_variables = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 52 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1]
2828 @.str12 = internal constant [3 x i8] c"s2\00", section "llvm.metadata" ; <[3 x i8]*> [#uses=1]
29 @llvm.dbg.global_variable = internal constant %llvm.dbg.global_variable.type { i32 458804, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.global_variables to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([3 x i8]* @.str12, i32 0, i32 0), i8* getelementptr ([3 x i8]* @.str12, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 6, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite11 to { }*), i1 false, i1 true, { }* bitcast (%struct.s* @s2 to { }*), i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1, i32 0, i32 0) }, section "llvm.metadata" ; <%llvm.dbg.global_variable.type*> [#uses=0]
29 @llvm.dbg.global_variable = internal constant %llvm.dbg.global_variable.type { i32 458804, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.global_variables to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([3 x i8]* @.str12, i32 0, i32 0), i8* getelementptr ([3 x i8]* @.str12, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 6, { }* bitcast (%llvm.dbg.composite.type* @llvm.dbg.composite11 to { }*), i1 false, i1 true, { }* bitcast (%struct.s* @s2 to { }*), i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1, i32 0, i32 0) }, section "llvm.metadata" ; <%llvm.dbg.global_variable.type*> [#uses=0]
None ; RUN: llvm-as < %s | llc -f -o /dev/null
0 ; RUN: llvm-as < %s | llc -o /dev/null
11 %llvm.dbg.anchor.type = type { i32, i32 }
22 %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 }
33 %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8* }
None ; RUN: llvm-as < %s | llc -f -o /dev/null
0 ; RUN: llvm-as < %s | llc -o /dev/null
11 %llvm.dbg.anchor.type = type { i32, i32 }
22 %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 }
33 %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8*, i32 }
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 @.LC0 = internal global [10 x i8] c"argc: %d\0A\00" ; <[10 x i8]*> [#uses=1]
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @foo(i32 %X, i32 %Y, double %A) {
None ; RUN: llvm-as %s -o %t.bc -f
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; We were accidentally inverting the signedness of right shifts. Whoops.
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @bar(i8* %X) {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 target datalayout = "e-p:32:32"
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; Testcase distilled from 256.bzip2.
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; Testcase distilled from 256.bzip2.
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; This testcase failed to work because two variable sized allocas confused the
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ;
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; This testcase exposes a bug in the local register allocator where it runs out
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 @A = global i32 0 ; [#uses=1]
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli -force-interpreter=true %t.bc | grep 1
22
33 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 @.LC0 = internal global [12 x i8] c"Hello World\00" ; <[12 x i8]*> [#uses=1]
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 @X = global i32 7 ; [#uses=0]
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @bar() {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; test unconditional branch
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 declare void @exit(i32)
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @foo() {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; This tests to make sure that we can evaluate weird constant expressions
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define double @test(double* %DP, double %Arg) {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define void @test(i8* %P, i16* %P.upgrd.1, i32* %P.upgrd.2, i64* %P.upgrd.3) {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; test phi node
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; test return instructions
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as %s -f -o %t.bc
0 ; RUN: llvm-as %s -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as < %s -f -o /dev/null
0 ; RUN: llvm-as < %s -o /dev/null
11 ; PR4654
22
33
None ; RUN: not llvm-as %s -o /dev/null -f |& grep {redefinition of global '@B'}
0 ; RUN: not llvm-as %s -o /dev/null |& grep {redefinition of global '@B'}
11
22 @B = global i32 7
33 @B = global i32 7
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* Regression test. Just compile .c -> .ll to test */
33 int foo(void) {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 // This caused generation of the following type name:
33 // %Array = uninitialized global [10 x %complex int]
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 void *dlclose(void*);
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* Test problem where bad code was generated with a ?: statement was
33 in a function call argument */
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* This triggered a problem in reload, fixed by disabling most of the
33 * steps of compilation in GCC. Before this change, the code went through
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* This testcase causes a symbol table collision. Type names and variable
33 * names should be in distinct namespaces
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* Testcase for a problem where GCC allocated xqic to a register,
33 * and did not have a VAR_DECL that explained the stack slot to LLVM.
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* GCC Used to generate code that contained a branch to the entry node of
33 * the do_merge function. This is illegal LLVM code. To fix this, GCC now
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* test that locals are renamed with . notation */
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 int test(int X) {
33 return X;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* GCC wasn't handling 64 bit constants right fixed */
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 double FOO = 17;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 #include
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* GCC would generate bad code if not enough initializers are
33 specified for an array.
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 typedef struct Connection_Type {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* GCC was not emitting string constants of the correct length when
33 * embedded into a structure field like this. It thought the strlength
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* GCC was generating PHI nodes with an arity < #pred of the basic block the
33 * PHI node lived in. This was breaking LLVM because the number of entries
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* This code used to break GCC's SSA computation code. It would create
33 uses of B & C that are not dominated by their definitions. See:
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* GCC was not escaping quotes in string constants correctly, so this would
33 * get emitted:
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 int printf(const char *, ...);
33 int foo();
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* GCC is not outputting the static array to the LLVM backend, so bad things
33 * happen. Note that if this is defined static, everything seems fine.
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 struct S {
33 int i;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 typedef struct {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* Make sure the frontend is correctly marking static stuff as internal! */
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* Testcase for when struct tag conflicts with typedef name... grr */
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 #include
33 #include
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 #include
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 // Test list stuff
33
None // RUN: %llvmgcc -w -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -w -S %s -o - | llvm-as -o /dev/null
11
22 /* These are random tests that I used when working on the GCC frontend
33 originally. */
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 // Test ?: in function calls
None // RUN: %llvmgcc -w -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -w -S %s -o - | llvm-as -o /dev/null
11
22
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 char auto_kibitz_list[100][20] = {
33 {"diepx"},
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 char * foo() { return "\\begin{"; }
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 #include
33 #include
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 union X {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 union X;
33 struct Empty {};
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 int tcount;
33 void test(char *, const char*, int);
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 typedef struct
33 {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 typedef union {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* In this testcase, the return value of foo() is being promotedto a register
33 * which breaks stuff
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* This testcase doesn't actually test a bug, it's just the result of me
33 * figuring out the syntax for forward declaring a static variable. */
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 int foo(int *A, unsigned X) {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 struct DWstruct {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 extern void start() __asm__("start");
33 extern void _start() __asm__("_start");
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 void foo() {}
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 _Bool X = 0;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 const char *W = "foo";
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 extern char algbrfile[9];
33 char algbrfile[9] = "abcdefgh";
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 typedef struct
33 {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 struct Blend_Map_Entry {
33 union {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 double Test(double A, double B, double C, double D) {
33 return -(A-B) - (C-D);
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 typedef struct min_info {
33 long offset;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 /* This is apparently legal C.
33 */
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 #include
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 typedef struct {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 void foo()
33 {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 extern int vfork(void);
33 test() {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 struct bar;
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 typedef struct {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 #include
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 struct Word {
33 short bar;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 void foo() {
33 unsigned char int_latin1[] = "f\200\372b\200\343\200\340";
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 struct foo {
33 unsigned int I:1;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 struct foo {
33 unsigned int I:1;
None // RUN: %llvmgcc -w -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -w -S %s -o - | llvm-as -o /dev/null
11
22
33 typedef struct BF {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 enum En {
33 ENUM_VAL
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 #include
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 extern int A[10];
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 struct Foo {
33 unsigned a;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 #ident "foo"
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 struct foo { int X; };
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 typedef struct { int foo; } spinlock_t;
33 typedef struct wait_queue_head_t { spinlock_t lock; } wait_queue_head_t;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 typedef struct { } the_coolest_struct_in_the_world;
33 extern the_coolest_struct_in_the_world xyzzy;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 union bdflush_param {
33 struct { int x; } b_un;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 typedef struct { } rwlock_t;
33 struct fs_struct { rwlock_t lock; int umask; };
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 void schedule_timeout(signed long timeout)
33 {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 void query_newnamebuf(void) { ((void)"query_newnamebuf"); }
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 void bar () {
33 static char x[10];
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 typedef struct { unsigned long pgprot; } pgprot_t;
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 struct _GIOChannel {
33 int write_buf;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 struct face_cachel {
33 unsigned int reverse :1;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 int test() {
33 __complex__ double C;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 struct printf_spec {
33 unsigned int minus_flag:1;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 unsigned long do_csum(const unsigned char *buff, int len, unsigned long result) {
33 if (2 & (unsigned long) buff) result += 1;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 struct i387_soft_struct {
33 long cwd;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 struct i387_soft_struct {
33 long cwd;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 extern __inline long int
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 void test(__complex__ double D, double X) {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 // Test that these initializers are handled efficiently
33
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 int code[]={0,0,0,0,1};
33 void foo(int x) {
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 int foo() {
33 #ifdef __ppc__
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 int foo(int len, char arr[][len], int X) {
33 return arr[X][0];
None // RUN: %llvmgcc -w -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -w -S %s -o - | llvm-as -o /dev/null
11
22 void test(enum foo *X) {
33 }
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 struct fu;
33 void foo(struct fu);
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 _Bool A, B, C, D, E, F, G, H;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 struct S { };
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 static int unused_func(void) {
33 return 1;
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22
33 #define A(X) int X;
None // RUN: %llvmgcc %s -S -o - | llvm-as -o /dev/null -f
0 // RUN: %llvmgcc %s -S -o - | llvm-as -o /dev/null
11
22 const double _Complex x[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
33
0 // Check bitfields.
11 // RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \
2 // RUN: llc --disable-fp-elim -o 2009-02-17-BitField-dbg.s -f
2 // RUN: llc --disable-fp-elim -o 2009-02-17-BitField-dbg.s
33 // RUN: %compile_c 2009-02-17-BitField-dbg.s -o 2009-02-17-BitField-dbg.o
44 // RUN: echo {ptype mystruct} > %t2
55 // RUN: gdb -q -batch -n -x %t2 2009-02-17-BitField-dbg.o | \
None // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
11
22 #include
33 signed short _iodbcdm_sqlerror( )
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 void foo();
33
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 // This tests compilation of EMPTY_CLASS_EXPR's
33
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22
33 namespace foo {
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 // Default placement versions of operator new.
33 #include
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22
33 char* eback();
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 // There is a HOLE in the derived2 object due to not wanting to place the two
33 // baseclass instances at the same offset!
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 struct duration {
33 duration operator/=(int c) {
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 // Non-POD classes cannot be passed into a function by component, because their
33 // dtors must be run. Instead, pass them in by reference. The C++ front-end
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 class Empty {};
33
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 struct C {};
33
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 // Test with an opaque type
33
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 // The C++ front-end thinks the two foo's are different, the LLVM emitter
33 // thinks they are the same. The disconnect causes problems.
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 struct test {
33 bool A : 1;
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22
33 template
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22
33 struct Foo {
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 #include
33
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 enum TchkType {
33 tchkNum, tchkString, tchkSCN, tchkNone
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 struct Gfx {
33 void opMoveSetShowText();
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 #include
33 std::vector my_method ();
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22
33 struct CallSite {
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22
33 void doesntThrow() throw();
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 struct Evil {
33 void fun ();
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 struct A {
33 virtual void Method() = 0;
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 // Testcase from Bug 291
33
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22
33
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 struct Pass {} ;
33 template
0 // This is a regression test on debug info to make sure that we can get a
11 // meaningful stack trace from a C++ program.
22 // RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \
3 // RUN: llc --disable-fp-elim -o %t.s -f -O0 -relocation-model=pic
3 // RUN: llc --disable-fp-elim -o %t.s -O0 -relocation-model=pic
44 // RUN: %compile_c %t.s -o %t.o
55 // RUN: %link %t.o -o %t.exe
66 // RUN: echo {break DeepStack::deepest\nrun 17\nwhere\n} > %t.in
0 // This is a regression test on debug info to make sure we don't hit a compile
11 // unit size issue with gdb.
22 // RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \
3 // RUN: llc --disable-fp-elim -o NoCompileUnit.s -f
3 // RUN: llc --disable-fp-elim -o NoCompileUnit.s
44 // RUN: %compile_c NoCompileUnit.s -o NoCompileUnit.o
55 // RUN: %link NoCompileUnit.o -o NoCompileUnit.exe
66 // RUN: echo {break main\nrun\np NoCompileUnit::pubname} > %t2
0 // This is a regression test on debug info to make sure that we can access
11 // qualified global names.
22 // RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \
3 // RUN: llc --disable-fp-elim -o %t.s -f -O0
3 // RUN: llc --disable-fp-elim -o %t.s -O0
44 // RUN: %compile_c %t.s -o %t.o
55 // RUN: %link %t.o -o %t.exe
66 // RUN: %llvmdsymutil %t.exe
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 #ifdef PACKED
33 #define P __attribute__((packed))
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 #ifdef PACKED
33 #define P __attribute__((packed))
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22
33 #ifdef PACKED
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22
33 #ifdef PACKED
None // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
0 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
11
22 #ifdef PACKED
33 #define P __attribute__((packed))
None // RUN: %llvmgcc -c -g %s -o - | llc -O0 -f -o %t.s
0 // RUN: %llvmgcc -c -g %s -o - | llc -O0 -o %t.s
11 // RUN: %compile_c %t.s -o %t.o
22 // PR4025
33
0 // This is a regression test on debug info to make sure that we can
11 // print line numbers in asm.
22 // RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \
3 // RUN: llc --disable-fp-elim -f -O0 -relocation-model=pic | grep {# SrcLine 25}
3 // RUN: llc --disable-fp-elim -O0 -relocation-model=pic | grep {# SrcLine 25}
44 // XFAIL: *
55
66 #include
0 // This is a regression test on debug info to make sure that we can set a
11 // breakpoint on a objective message.
2 // RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | llc -o %t.s -f -O0
2 // RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | llc -o %t.s -O0
33 // RUN: %compile_c %t.s -o %t.o
44 // RUN: %link %t.o -o %t.exe -framework Foundation
55 // RUN: echo {break randomFunc\n} > %t.in
11 ; one...
22
33 ; RUN: echo {define internal i32 @foo() \{ ret i32 7 \} } | llvm-as > %t.1.bc
4 ; RUN: llvm-as %s -o %t.2.bc -f
4 ; RUN: llvm-as %s -o %t.2.bc
55 ; RUN: llvm-link %t.1.bc %t.2.bc | llvm-dis | grep @foo() | grep -v internal
66
77 define i32 @foo() { ret i32 0 }
0 ; RUN: echo {@X = linkonce global i32 5 \
11 ; RUN: define linkonce i32 @foo() \{ ret i32 7 \} } | llvm-as > %t.1.bc
2 ; RUN: llvm-as %s -o %t.2.bc -f
2 ; RUN: llvm-as %s -o %t.2.bc
33 ; RUN: llvm-link %t.1.bc %t.2.bc
44 @X = external global i32
55
11 ; one...
22
33 ; RUN: echo { define linkonce void @foo() \{ ret void \} } | \
4 ; RUN: llvm-as -o %t.2.bc -f
5 ; RUN: llvm-as %s -o %t.1.bc -f
4 ; RUN: llvm-as -o %t.2.bc
5 ; RUN: llvm-as %s -o %t.1.bc
66 ; RUN: llvm-link %t.1.bc %t.2.bc | llvm-dis | grep foo | grep linkonce
77
88 declare void @foo()
11 ; the same type to be created!
22
33 ; RUN: echo {%T = type i32} | llvm-as > %t.2.bc
4 ; RUN: llvm-as %s -f -o %t.1.bc
4 ; RUN: llvm-as %s -o %t.1.bc
55 ; RUN: llvm-link %t.1.bc %t.2.bc
66
77 %T = type opaque
0 ; RUN: llvm-as < %s > %t.out2.bc
11 ; RUN: echo "@me = global i32* null" | llvm-as > %t.out1.bc
2 ; RUN: llvm-link %t.out1.bc %t.out2.bc -o /dev/null -f
2 ; RUN: llvm-link %t.out1.bc %t.out2.bc -o /dev/null
33
44 @me = weak global i32* null ; [#uses=0]
55
None ; RUN: llvm-as %s -f -o %t1.bc
1 ; RUN: llvm-as < %p/2004-05-07-TypeResolution2.ll -o %t2.bc -f
2 ; RUN: llvm-link -f -o %t3.bc %t1.bc %t2.bc
0 ; RUN: llvm-as %s -o %t1.bc
1 ; RUN: llvm-as < %p/2004-05-07-TypeResolution2.ll -o %t2.bc
2 ; RUN: llvm-link -o %t3.bc %t1.bc %t2.bc
33
44 target datalayout = "e-p:32:32"
55 %myint = type opaque
None ; RUN: llvm-as %s -f -o %t1.bc
1 ; RUN: llvm-link -f -o %t2.bc %t1.bc
0 ; RUN: llvm-as %s -o %t1.bc
1 ; RUN: llvm-link -o %t2.bc %t1.bc
22
33 target datalayout = "E-p:32:32"
44 target triple = "powerpc-apple-darwin7.7.0"
0 ; PR2054
1 ; RUN: llvm-as %s -o %t1.bc -f
2 ; RUN: llvm-as %p/2008-03-05-AliasReference2.ll -o %t2.bc -f
3 ; RUN: llvm-link %t2.bc %t1.bc -f -o %t3.bc
1 ; RUN: llvm-as %s -o %t1.bc
2 ; RUN: llvm-as %p/2008-03-05-AliasReference2.ll -o %t2.bc
3 ; RUN: llvm-link %t2.bc %t1.bc -o %t3.bc
44
55 ; ModuleID = 'bug.o'
66 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
0 ; Test linking two functions with different prototypes and two globals
11 ; in different modules.
2 ; RUN: llvm-as %s -o %t.foo1.bc -f
3 ; RUN: llvm-as %s -o %t.foo2.bc -f
4 ; RUN: echo {define linkonce void @foo(i32 %x) { ret void }} | llvm-as -o %t.foo3.bc -f
2 ; RUN: llvm-as %s -o %t.foo1.bc
3 ; RUN: llvm-as %s -o %t.foo2.bc
4 ; RUN: echo {define linkonce void @foo(i32 %x) { ret void }} | llvm-as -o %t.foo3.bc
55 ; RUN: llvm-link %t.foo1.bc %t.foo2.bc | llvm-dis
66 ; RUN: llvm-link %t.foo1.bc %t.foo3.bc | llvm-dis
77 define linkonce void @foo() { ret void }
0 ; Test linking two functions with different prototypes and two globals
11 ; in different modules.
2 ; RUN: llvm-as %s -o %t.foo1.bc -f
3 ; RUN: echo | llvm-as -o %t.foo2.bc -f
2 ; RUN: llvm-as %s -o %t.foo1.bc
3 ; RUN: echo | llvm-as -o %t.foo2.bc
44 ; RUN: llvm-link %t.foo2.bc %t.foo1.bc | llvm-dis | grep {addrspace(2)}
55 ; RUN: llvm-link %t.foo1.bc %t.foo2.bc | llvm-dis | grep {addrspace(2)}
66 ; rdar://6038021
0 ; PR2146
1 ; RUN: llvm-as %s -o %t1.bc -f
2 ; RUN: llvm-as %p/2008-07-06-AliasFnDecl2.ll -o %t2.bc -f
3 ; RUN: llvm-link %t1.bc %t2.bc -f -o %t3.bc
1 ; RUN: llvm-as %s -o %t1.bc
2 ; RUN: llvm-as %p/2008-07-06-AliasFnDecl2.ll -o %t2.bc
3 ; RUN: llvm-link %t1.bc %t2.bc -o %t3.bc
44
55 @b = alias void ()* @a
66
0 ; PR2463
1 ; RUN: llvm-as %s -o %t1.bc -f
2 ; RUN: llvm-as %p/2008-07-06-AliasWeakDest2.ll -o %t2.bc -f
3 ; RUN: llvm-link %t1.bc %t2.bc -f -o %t3.bc
4 ; RUN: llvm-link %t2.bc %t1.bc -f -o %t4.bc
1 ; RUN: llvm-as %s -o %t1.bc
2 ; RUN: llvm-as %p/2008-07-06-AliasWeakDest2.ll -o %t2.bc
3 ; RUN: llvm-link %t1.bc %t2.bc -o %t3.bc
4 ; RUN: llvm-link %t2.bc %t1.bc -o %t4.bc
55
66 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
77 target triple = "i386-pc-linux-gnu"
0 ; Test linking two functions with different prototypes and two globals
11 ; in different modules. This is for PR411
2 ; RUN: llvm-as %s -o %t.bar.bc -f
2 ; RUN: llvm-as %s -o %t.bar.bc
33 ; RUN: echo {define i32* @foo(i32 %x) \{ ret i32* @baz \} \
4 ; RUN: @baz = external global i32 } | llvm-as -o %t.foo.bc -f
5 ; RUN: llvm-link %t.bar.bc %t.foo.bc -o %t.bc -f
6 ; RUN: llvm-link %t.foo.bc %t.bar.bc -o %t.bc -f
4 ; RUN: @baz = external global i32 } | llvm-as -o %t.foo.bc
5 ; RUN: llvm-link %t.bar.bc %t.foo.bc -o %t.bc
6 ; RUN: llvm-link %t.foo.bc %t.bar.bc -o %t.bc
77 declare i32* @foo(...)
88 define i32* @bar() {
99 %ret = call i32* (...)* @foo( i32 123 )
0 ; Test linking of a bc file to an archive via llvm-ld.
11 ; PR1434
2 ; RUN: llvm-as %s -o %t.bar.bc -f
2 ; RUN: llvm-as %s -o %t.bar.bc
33 ; RUN: echo {define i32* @foo(i32 %x) \{ ret i32* @baz \} \
4 ; RUN: @baz = external global i32 } | llvm-as -o %t.foo.bc -f
4 ; RUN: @baz = external global i32 } | llvm-as -o %t.foo.bc
55 ; RUN: llvm-ar rcf %t.foo.a %t.foo.bc
66 ; RUN: llvm-ar rcf %t.bar.a %t.bar.bc
77 ; RUN: llvm-ld -disable-opt %t.bar.bc %t.foo.a -o %t.bc
None ; RUN: llvm-as %s -o %t1.bc -f
1 ; RUN: echo {declare void @__eprintf(i8*, i8*, i32, i8*) noreturn define void @foo() { tail call void @__eprintf( i8* undef, i8* undef, i32 4, i8* null ) noreturn nounwind unreachable }} | llvm-as -o %t2.bc -f
0 ; RUN: llvm-as %s -o %t1.bc
1 ; RUN: echo {declare void @__eprintf(i8*, i8*, i32, i8*) noreturn define void @foo() { tail call void @__eprintf( i8* undef, i8* undef, i32 4, i8* null ) noreturn nounwind unreachable }} | llvm-as -o %t2.bc
22 ; RUN: llvm-link %t2.bc %t1.bc -o - | llvm-dis | grep __eprintf
33 ; RUN: llvm-link %t1.bc %t2.bc -o - | llvm-dis | grep __eprintf
44
0 ; Test that linking two files with the same definition causes an error and
11 ; that error is printed out.
2 ; RUN: llvm-as %s -o %t.one.bc -f
3 ; RUN: llvm-as %s -o %t.two.bc -f
2 ; RUN: llvm-as %s -o %t.one.bc
3 ; RUN: llvm-as %s -o %t.two.bc
44 ; RUN: not llvm-ld -disable-opt -link-as-library %t.one.bc %t.two.bc \
55 ; RUN: -o %t.bc 2>%t.err
66 ; RUN: grep "symbol multiply defined" %t.err
0 ; Test linking two functions with different prototypes and two globals
11 ; in different modules.
2 ; RUN: llvm-as %s -o %t.foo1.bc -f
3 ; RUN: llvm-as %s -o %t.foo2.bc -f
4 ; RUN: echo {define void @foo(i32 %x) { ret void }} | llvm-as -o %t.foo3.bc -f
2 ; RUN: llvm-as %s -o %t.foo1.bc
3 ; RUN: llvm-as %s -o %t.foo2.bc
4 ; RUN: echo {define void @foo(i32 %x) { ret void }} | llvm-as -o %t.foo3.bc
55 ; RUN: not llvm-link %t.foo1.bc %t.foo2.bc -o %t.bc |& \
66 ; RUN: grep {symbol multiply defined}
77 ; RUN: not llvm-link %t.foo1.bc %t.foo3.bc -o %t.bc |& \
0 ; RUN: llvm-as < %s > %t.bc
11 ; RUN: llvm-as < %p/testlink1.ll > %t2.bc
2 ; RUN: llvm-link %t.bc %t.bc %t2.bc -o %t1.bc -f
2 ; RUN: llvm-link %t.bc %t.bc %t2.bc -o %t1.bc
33 ; RUN: llvm-dis < %t1.bc | grep {kallsyms_names = extern_weak}
44 ; RUN: llvm-dis < %t1.bc | grep {MyVar = external global i32}
55 ; RUN: llvm-dis < %t1.bc | grep {Inte = global i32}
6868 # LLVM source, use the non-transforming assembler.
6969 #
7070 Output/%.bc: %.ll $(LLVMAS) Output/.dir
71 -$(LLVMAS) -f $< -o $@
71 -$(LLVMAS) $< -o $@
7272
7373 ## Cancel built-in implicit rules that override above rules
7474 %: %.s
None ; RUN: llvm-as < %s | opt -inline -f - | llvm-dis | grep "define internal i32 @bar"
0 ; RUN: llvm-as < %s | opt -inline - | llvm-dis | grep "define internal i32 @bar"
11 @llvm.noinline = appending global [1 x i8*] [ i8* bitcast (i32 (i32, i32)* @bar to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0]
22
33 define internal i32 @bar(i32 %x, i32 %y) {
0 ; Test that this transform works:
11 ; udiv X, (Select Cond, C1, C2) --> Select Cond, (shr X, C1), (shr X, C2)
22 ;
3 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis -f -o %t
3 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis -o %t
44 ; RUN: not grep select %t
55 ; RUN: grep lshr %t | count 2
66 ; RUN: not grep udiv %t
0 ; RUN: llvm-as < %s | opt -tailduplicate | \
1 ; RUN: llc -march=x86 -o %t -f
1 ; RUN: llc -march=x86 -o %t
22 ; RUN: grep {\\\} %t
33 ; RUN: not grep jmp %t
44 ; END.
None ; RUN: not llvm-as -f %s -o /dev/null |& grep {Cannot allocate unsized type}
0 ; RUN: not llvm-as %s -o /dev/null |& grep {Cannot allocate unsized type}
11 ; PR2113
22
33 define void @test() {
None ; RUN: not llvm-as -f %s -o /dev/null |& grep {alignment argument of memory intrinsics must be a constant int}
0 ; RUN: not llvm-as %s -o /dev/null |& grep {alignment argument of memory intrinsics must be a constant int}
11 ; PR2318
22
33 define void @x(i8* %a, i8* %src, i64 %len, i32 %align) nounwind {
None ; RUN: not llvm-as -f %s -o /dev/null |& grep {Only PHI nodes may reference their own value}
0 ; RUN: not llvm-as %s -o /dev/null |& grep {Only PHI nodes may reference their own value}
11
22 ; Test that self referential instructions are not allowed
33
None ; RUN: not llvm-as -f %s -o /dev/null |& grep {Aliasing chain should end with function or global variable}
0 ; RUN: not llvm-as %s -o /dev/null |& grep {Aliasing chain should end with function or global variable}
11
22 ; Test that alising chain does not create a cycle
33
None ; RUN: llvm-as %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null
11 %struct.foo = type { i64 }
22
33 declare void @h(%struct.foo* byval %num)
None ; RUN: not llvm-as %s -f |& grep {not verify as correct}
0 ; RUN: not llvm-as %s |& grep {not verify as correct}
11 ; PR1042
22
33 define i32 @foo() {
4747 # Run llvm-as/llvm-dis
4848 set pipeline llvm-as|llvm-dis
4949 set retval [ catch {
50 exec -keepnewline $llvmas < $test -o - | $llvmdis -f -o $assembly 2>/dev/null } msg ]
50 exec -keepnewline $llvmas < $test -o - | $llvmdis-o $assembly 2>/dev/null } msg ]
5151
5252 if { $retval != 0 } {
5353 fail "$test: $pipeline returned $retval\n$msg"
6464 }
6565
6666 set retval [ catch {
67 exec -keepnewline $llc -march=cpp -f -o $generated < $bytecode 2>/dev/null } msg]
67 exec -keepnewline $llc -march=cpp-o $generated < $bytecode 2>/dev/null } msg]
6868
6969 if { $retval != 0 } {
7070 fail "$test: llvm2cpp returned $retval\n$msg"