Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions llvm/test/Assembler/2002-04-07-InfConstant.ll
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
; The output formater prints out 1.0e100 as Inf!
; The output formatter prints out 1.0e100 as Inf!
;
; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | grep 0x7FF0000000000000
; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s

; CHECK: fmul float 0x7FF0000000000000, 1.000000e+01
define float @test() {
%tmp = fmul float 0x7FF0000000000000, 1.000000e+01 ; <float> [#uses=1]
ret float %tmp
Expand Down
12 changes: 7 additions & 5 deletions llvm/test/Assembler/2002-04-29-NameBinding.ll
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
;
; Check by running globaldce, which will remove the constant if there are
; no references to it!
;
; RUN: opt < %s -passes=globaldce -S | \
; RUN: not grep constant
;
; RUN: opt < %s -passes=globaldce -S | FileCheck %s
;
; RUN: verify-uselistorder %s

@v1 = internal constant i32 5
; CHECK-NOT: constant
; CHECK-NOT: @v1

@v1 = internal constant i32 5

define i32 @createtask() {
%v1 = alloca i32 ;; Alloca should have one use!
%v1 = alloca i32 ;; Alloca should have one use!
%reg112 = load i32, ptr %v1 ;; This load should not use the global!
ret i32 %reg112
}
Expand Down
6 changes: 4 additions & 2 deletions llvm/test/Assembler/2003-04-15-ConstantInitAssertion.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
; RUN: not llvm-as < %s >/dev/null 2> %t
; RUN: grep "struct initializer doesn't match struct element type" %t
; RUN: not llvm-as -disable-output %s 2>&1 | FileCheck %s

; Test the case of a misformed constant initializer
; This should cause an assembler error, not an assertion failure!

; CHECK: struct initializer doesn't match struct element type
@0 = constant { i32 } { float 1.0 }
3 changes: 2 additions & 1 deletion llvm/test/Assembler/2003-05-12-MinIntProblem.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
; RUN: llvm-as < %s | llvm-dis | grep -- -2147483648
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s

; CHECK: i32 -2147483648
define i32 @foo() {
ret i32 -2147483648
}
5 changes: 3 additions & 2 deletions llvm/test/Assembler/2003-05-21-MalformedStructCrash.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
; Found by inspection of the code
; RUN: not llvm-as < %s > /dev/null 2> %t
; RUN: grep "initializer with struct type has wrong # elements" %t
; RUN: not llvm-as -disable-output < %s 2>&1 | FileCheck %s

; CHECK: initializer with struct type has wrong # elements

@0 = global {} { i32 7, float 1.0, i32 7, i32 8 }
7 changes: 6 additions & 1 deletion llvm/test/Assembler/2003-08-20-ConstantExprGEP-Fold.ll
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
; RUN: opt < %s -passes=instcombine,simplifycfg -S | not grep br
; RUN: opt < %s -passes=instcombine,simplifycfg -S | FileCheck %s
; RUN: verify-uselistorder %s

@.str_1 = internal constant [6 x i8] c"_Bool\00" ; <ptr> [#uses=2]

; Make sure there is no branch
; CHECK: define i32 @test(
; CHECK-NEXT: endif.7:
; CHECK-NEXT: ret i32 0
; CHECK-NEXT: }
define i32 @test() {
%tmp.54 = load i8, ptr getelementptr ([6 x i8], ptr @.str_1, i64 0, i64 1) ; <i8> [#uses=1]
%tmp.55 = icmp ne i8 %tmp.54, 66 ; <i1> [#uses=1]
Expand Down
3 changes: 2 additions & 1 deletion llvm/test/Assembler/2003-11-24-SymbolTableCrash.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
; RUN: not llvm-as < %s 2>&1 | grep "multiple definition"
; RUN: not llvm-as -disable-output < %s 2>&1 | FileCheck %s

; CHECK: error: multiple definition of local value named 'tmp.1'
define void @test() {
%tmp.1 = add i32 0, 1
br label %return
Expand Down
3 changes: 2 additions & 1 deletion llvm/test/Assembler/2004-01-20-MaxLongLong.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
; RUN: llvm-as < %s | llvm-dis | grep 9223372036854775808
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s

; CHECK: i64 -9223372036854775808
@0 = global i64 -9223372036854775808

4 changes: 3 additions & 1 deletion llvm/test/Assembler/2004-03-30-UnclosedFunctionCrash.ll
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
; RUN: not llvm-as %s 2>&1 | grep "found end of file when expecting more instructions"
; RUN: not llvm-as %s 2>&1 | FileCheck %s

; CHECK: found end of file when expecting more instructions

define void @foo() {
5 changes: 3 additions & 2 deletions llvm/test/Assembler/2006-09-28-CrashOnInvalid.ll
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
; Test for PR902. This program is erroneous, but should not crash llvm-as.
; This tests that a simple error is caught and processed correctly.
; RUN: not llvm-as < %s >/dev/null 2> %t
; RUN: grep "floating point constant invalid for type" %t
; RUN: not llvm-as -disable-output %s 2>&1 | FileCheck %s

; CHECK: floating point constant invalid for type

define void @test() {
add i32 1, 2.0
Expand Down
3 changes: 2 additions & 1 deletion llvm/test/Assembler/2006-12-09-Cast-To-Bool.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
; RUN: llvm-as < %s | llvm-dis | grep bitcast
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s

; CHECK: bitcast
define i1 @main(i32 %X) {
%res = bitcast i1 true to i1
ret i1 %res
Expand Down
4 changes: 3 additions & 1 deletion llvm/test/Assembler/2007-01-16-CrashOnBadCast.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
; PR1117
; RUN: not llvm-as %s -o /dev/null 2>&1 | grep "invalid cast opcode for cast from"
; RUN: not llvm-as -disable-output %s 2>&1 | FileCheck %s

; CHECK: error: invalid cast opcode for cast from 'i64' to 'ptr'

define ptr @nada(i64 %X) {
%result = trunc i64 %X to ptr
Expand Down
3 changes: 2 additions & 1 deletion llvm/test/Assembler/2007-01-16-CrashOnBadCast2.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
; PR1117
; RUN: not llvm-as %s -o /dev/null 2>&1 | grep "invalid cast opcode for cast from"
; RUN: not llvm-as -disable-output %s 2>&1 | FileCheck %s

; CHECK: error: invalid cast opcode for cast from 'i64' to 'ptr'
@X = constant ptr trunc (i64 0 to ptr)
4 changes: 2 additions & 2 deletions llvm/test/Assembler/2007-03-18-InvalidNumberedVar.ll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; PR 1258
; RUN: not llvm-as < %s >/dev/null 2> %t
; RUN: grep "'%0' defined with type 'i1'" %t
; RUN: not llvm-as -disable-output < %s 2>&1 | FileCheck %s

; CHECK: '%0' defined with type 'i1'
define i32 @test1(i32 %a, i32 %b) {
entry:
icmp eq i32 %b, %a ; <i1>:0 [#uses=1]
Expand Down
3 changes: 2 additions & 1 deletion llvm/test/Assembler/2007-04-20-AlignedLoad.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
; RUN: llvm-as < %s | llvm-dis | grep "align 1024"
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s

; CHECK: %tmp2 = load i32, ptr %arg, align 1024
define i32 @test(ptr %arg) {
entry:
%tmp2 = load i32, ptr %arg, align 1024 ; <i32> [#uses=1]
Expand Down
3 changes: 2 additions & 1 deletion llvm/test/Assembler/2007-04-20-AlignedStore.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
; RUN: llvm-as < %s | llvm-dis | grep "align 1024"
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s

; CHECK: align 1024
define void @test(ptr %arg) {
entry:
store i32 0, ptr %arg, align 1024
Expand Down
9 changes: 5 additions & 4 deletions llvm/test/Assembler/2007-08-06-AliasInvalid.ll
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
; RUN: not llvm-as < %s > /dev/null 2> %t
; RUN: grep "expected top-level entity" %t
; RUN: not llvm-as -disable-output < %s 2>&1 | FileCheck %s
; PR1577

@anInt = global i32 1
; CHECK: expected top-level entity

@anInt = global i32 1
alias i32 @anAlias

define i32 @main() {
ret i32 0
ret i32 0
}
6 changes: 4 additions & 2 deletions llvm/test/Assembler/2008-01-11-VarargAttrs.ll
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
; RUN: llvm-as < %s | llvm-dis | grep byval
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s

%struct = type { }
%struct = type { }

; CHECK: declare void @foo(...)
declare void @foo(...)

; CHECK: call void (...) @foo(ptr byval(%struct) null)
define void @bar() {
call void (...) @foo(ptr byval(%struct) null )
ret void
Expand Down
4 changes: 3 additions & 1 deletion llvm/test/Assembler/2008-02-18-IntPointerCrash.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
; RUN: not llvm-as %s 2>&1 | grep "integer constant must have integer type"
; RUN: not llvm-as %s 2>&1 | FileCheck %s
; PR2060

; CHECK: integer constant must have integer type

define ptr @foo() {
ret ptr 0
}
5 changes: 3 additions & 2 deletions llvm/test/Assembler/2008-09-29-RetAttr.ll
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
; Test return attributes
; RUN: llvm-as < %s | llvm-dis | grep "define inreg i32"
; RUN: llvm-as < %s | llvm-dis | grep "call inreg i32"
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s

; CHECK: define inreg i32 @fn1()
define inreg i32 @fn1() {
ret i32 0
}

; CHECK: call inreg i32 @fn1()
define void @fn2() {
%t = call inreg i32 @fn1()
ret void
Expand Down
3 changes: 2 additions & 1 deletion llvm/test/Assembler/2008-10-14-QuoteInName.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
; RUN: llvm-as < %s | llvm-dis | grep "quote"
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s

; CHECK: quote
@"a\22quote" = global i32 0
Loading