mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-30 06:40:53 +00:00
Move various XCore tests to FileCheck
llvm-svn: 143457
This commit is contained in:
parent
361c873b52
commit
280d51dd14
@ -1,15 +1,17 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: grep "bl cosf" %t1.s | count 1
|
||||
; RUN: grep "bl cos" %t1.s | count 2
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
declare double @llvm.cos.f64(double)
|
||||
|
||||
define double @test(double %F) {
|
||||
; CHECK: test:
|
||||
; CHECK: bl cos
|
||||
%result = call double @llvm.cos.f64(double %F)
|
||||
ret double %result
|
||||
}
|
||||
|
||||
declare float @llvm.cos.f32(float)
|
||||
|
||||
; CHECK: testf:
|
||||
; CHECK: bl cosf
|
||||
define float @testf(float %F) {
|
||||
%result = call float @llvm.cos.f32(float %F)
|
||||
ret float %result
|
||||
|
@ -1,9 +1,9 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: grep "bl expf" %t1.s | count 1
|
||||
; RUN: grep "bl exp" %t1.s | count 2
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
declare double @llvm.exp.f64(double)
|
||||
|
||||
define double @test(double %F) {
|
||||
; CHECK: test:
|
||||
; CHECK: bl exp
|
||||
%result = call double @llvm.exp.f64(double %F)
|
||||
ret double %result
|
||||
}
|
||||
@ -11,6 +11,8 @@ define double @test(double %F) {
|
||||
declare float @llvm.exp.f32(float)
|
||||
|
||||
define float @testf(float %F) {
|
||||
; CHECK: testf:
|
||||
; CHECK: bl expf
|
||||
%result = call float @llvm.exp.f32(float %F)
|
||||
ret float %result
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: grep "bl exp2f" %t1.s | count 1
|
||||
; RUN: grep "bl exp2" %t1.s | count 2
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
declare double @llvm.exp2.f64(double)
|
||||
|
||||
define double @test(double %F) {
|
||||
; CHECK: test:
|
||||
; CHECK: bl exp2
|
||||
%result = call double @llvm.exp2.f64(double %F)
|
||||
ret double %result
|
||||
}
|
||||
@ -11,6 +11,8 @@ define double @test(double %F) {
|
||||
declare float @llvm.exp2.f32(float)
|
||||
|
||||
define float @testf(float %F) {
|
||||
; CHECK: testf:
|
||||
; CHECK: bl exp2f
|
||||
%result = call float @llvm.exp2.f32(float %F)
|
||||
ret float %result
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
; RUN: llc < %s -march=xcore | grep "xor" | count 1
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
define i1 @test(double %F) nounwind {
|
||||
entry:
|
||||
; CHECK: test:
|
||||
; CHECK: xor
|
||||
%0 = fsub double -0.000000e+00, %F
|
||||
%1 = fcmp olt double 0.000000e+00, %0
|
||||
ret i1 %1
|
||||
|
@ -1,8 +1,10 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: grep "get r11, id" %t1.s | count 1
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
declare i32 @llvm.xcore.getid()
|
||||
|
||||
define i32 @test() {
|
||||
; CHECK: test:
|
||||
; CHECK: get r11, id
|
||||
; CHECK-NEXT: mov r0, r11
|
||||
%result = call i32 @llvm.xcore.getid()
|
||||
ret i32 %result
|
||||
}
|
||||
|
@ -1,15 +1,9 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: not grep add %t1.s
|
||||
; RUN: not grep ldaw %t1.s
|
||||
; RUN: not grep lda16 %t1.s
|
||||
; RUN: not grep zext %t1.s
|
||||
; RUN: not grep sext %t1.s
|
||||
; RUN: grep "ldw" %t1.s | count 2
|
||||
; RUN: grep "ld16s" %t1.s | count 1
|
||||
; RUN: grep "ld8u" %t1.s | count 1
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
|
||||
define i32 @load32(i32* %p, i32 %offset) nounwind {
|
||||
entry:
|
||||
; CHECK: load32:
|
||||
; CHECK: ldw r0, r0[r1]
|
||||
%0 = getelementptr i32* %p, i32 %offset
|
||||
%1 = load i32* %0, align 4
|
||||
ret i32 %1
|
||||
@ -17,6 +11,8 @@ entry:
|
||||
|
||||
define i32 @load32_imm(i32* %p) nounwind {
|
||||
entry:
|
||||
; CHECK: load32_imm:
|
||||
; CHECK: ldw r0, r0[11]
|
||||
%0 = getelementptr i32* %p, i32 11
|
||||
%1 = load i32* %0, align 4
|
||||
ret i32 %1
|
||||
@ -24,6 +20,9 @@ entry:
|
||||
|
||||
define i32 @load16(i16* %p, i32 %offset) nounwind {
|
||||
entry:
|
||||
; CHECK: load16:
|
||||
; CHECK: ld16s r0, r0[r1]
|
||||
; CHECK-NOT: sext
|
||||
%0 = getelementptr i16* %p, i32 %offset
|
||||
%1 = load i16* %0, align 2
|
||||
%2 = sext i16 %1 to i32
|
||||
@ -32,6 +31,9 @@ entry:
|
||||
|
||||
define i32 @load8(i8* %p, i32 %offset) nounwind {
|
||||
entry:
|
||||
; CHECK: load8:
|
||||
; CHECK: ld8u r0, r0[r1]
|
||||
; CHECK-NOT: zext
|
||||
%0 = getelementptr i8* %p, i32 %offset
|
||||
%1 = load i8* %0, align 1
|
||||
%2 = zext i8 %1 to i32
|
||||
|
@ -1,9 +1,9 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: grep "bl logf" %t1.s | count 1
|
||||
; RUN: grep "bl log" %t1.s | count 2
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
declare double @llvm.log.f64(double)
|
||||
|
||||
define double @test(double %F) {
|
||||
; CHECK: test:
|
||||
; CHECK: bl log
|
||||
%result = call double @llvm.log.f64(double %F)
|
||||
ret double %result
|
||||
}
|
||||
@ -11,6 +11,8 @@ define double @test(double %F) {
|
||||
declare float @llvm.log.f32(float)
|
||||
|
||||
define float @testf(float %F) {
|
||||
; CHECK: testf:
|
||||
; CHECK: bl logf
|
||||
%result = call float @llvm.log.f32(float %F)
|
||||
ret float %result
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: grep "bl log10f" %t1.s | count 1
|
||||
; RUN: grep "bl log10" %t1.s | count 2
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
declare double @llvm.log10.f64(double)
|
||||
|
||||
define double @test(double %F) {
|
||||
; CHECK: test:
|
||||
; CHECK: bl log10
|
||||
%result = call double @llvm.log10.f64(double %F)
|
||||
ret double %result
|
||||
}
|
||||
@ -11,6 +11,8 @@ define double @test(double %F) {
|
||||
declare float @llvm.log10.f32(float)
|
||||
|
||||
define float @testf(float %F) {
|
||||
; CHECK: testf:
|
||||
; CHECK: bl log10f
|
||||
%result = call float @llvm.log10.f32(float %F)
|
||||
ret float %result
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: grep "bl log2f" %t1.s | count 1
|
||||
; RUN: grep "bl log2" %t1.s | count 2
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
declare double @llvm.log2.f64(double)
|
||||
|
||||
define double @test(double %F) {
|
||||
; CHECK: test:
|
||||
; CHECK: bl log2
|
||||
%result = call double @llvm.log2.f64(double %F)
|
||||
ret double %result
|
||||
}
|
||||
@ -11,6 +11,8 @@ define double @test(double %F) {
|
||||
declare float @llvm.log2.f32(float)
|
||||
|
||||
define float @testf(float %F) {
|
||||
; CHECK: testf:
|
||||
; CHECK: bl log2f
|
||||
%result = call float @llvm.log2.f32(float %F)
|
||||
ret float %result
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: grep "bl powf" %t1.s | count 1
|
||||
; RUN: grep "bl pow" %t1.s | count 2
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
declare double @llvm.pow.f64(double, double)
|
||||
|
||||
define double @test(double %F, double %power) {
|
||||
; CHECK: test:
|
||||
; CHECK: bl pow
|
||||
%result = call double @llvm.pow.f64(double %F, double %power)
|
||||
ret double %result
|
||||
}
|
||||
@ -11,6 +11,8 @@ define double @test(double %F, double %power) {
|
||||
declare float @llvm.pow.f32(float, float)
|
||||
|
||||
define float @testf(float %F, float %power) {
|
||||
; CHECK: testf:
|
||||
; CHECK: bl powf
|
||||
%result = call float @llvm.pow.f32(float %F, float %power)
|
||||
ret float %result
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: grep "bl __powidf2" %t1.s | count 1
|
||||
; RUN: grep "bl __powisf2" %t1.s | count 1
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
declare double @llvm.powi.f64(double, i32)
|
||||
|
||||
define double @test(double %F, i32 %power) {
|
||||
; CHECK: test:
|
||||
; CHECK: bl __powidf2
|
||||
%result = call double @llvm.powi.f64(double %F, i32 %power)
|
||||
ret double %result
|
||||
}
|
||||
@ -11,6 +11,8 @@ define double @test(double %F, i32 %power) {
|
||||
declare float @llvm.powi.f32(float, i32)
|
||||
|
||||
define float @testf(float %F, i32 %power) {
|
||||
; CHECK: testf:
|
||||
; CHECK: bl __powisf2
|
||||
%result = call float @llvm.powi.f32(float %F, i32 %power)
|
||||
ret float %result
|
||||
}
|
||||
|
@ -1,19 +1,21 @@
|
||||
; Test to make sure that the 'private' is used correctly.
|
||||
;
|
||||
; RUN: llc < %s -march=xcore > %t
|
||||
; RUN: grep .Lfoo: %t
|
||||
; RUN: grep bl.*\.Lfoo %t
|
||||
; RUN: grep .Lbaz: %t
|
||||
; RUN: grep ldw.*\.Lbaz %t
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
|
||||
define private void @foo() {
|
||||
; CHECK: .Lfoo:
|
||||
ret void
|
||||
}
|
||||
|
||||
@baz = private global i32 4
|
||||
|
||||
define i32 @bar() {
|
||||
; CHECK: bar:
|
||||
; CHECK: bl .Lfoo
|
||||
; CHECK: ldw r0, dp[.Lbaz]
|
||||
call void @foo()
|
||||
%1 = load i32* @baz, align 4
|
||||
ret i32 %1
|
||||
}
|
||||
|
||||
; CHECK: .Lbaz:
|
||||
|
@ -1,9 +1,9 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: grep "bl sinf" %t1.s | count 1
|
||||
; RUN: grep "bl sin" %t1.s | count 2
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
declare double @llvm.sin.f64(double)
|
||||
|
||||
define double @test(double %F) {
|
||||
; CHECK: test:
|
||||
; CHECK: bl sin
|
||||
%result = call double @llvm.sin.f64(double %F)
|
||||
ret double %result
|
||||
}
|
||||
@ -11,6 +11,8 @@ define double @test(double %F) {
|
||||
declare float @llvm.sin.f32(float)
|
||||
|
||||
define float @testf(float %F) {
|
||||
; CHECK: testf:
|
||||
; CHECK: bl sinf
|
||||
%result = call float @llvm.sin.f32(float %F)
|
||||
ret float %result
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: grep "bl sqrtf" %t1.s | count 1
|
||||
; RUN: grep "bl sqrt" %t1.s | count 2
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
declare double @llvm.sqrt.f64(double)
|
||||
|
||||
define double @test(double %F) {
|
||||
; CHECK: test:
|
||||
; CHECK: bl sqrt
|
||||
%result = call double @llvm.sqrt.f64(double %F)
|
||||
ret double %result
|
||||
}
|
||||
@ -11,6 +11,8 @@ define double @test(double %F) {
|
||||
declare float @llvm.sqrt.f32(float)
|
||||
|
||||
define float @testf(float %F) {
|
||||
; CHECK: testf:
|
||||
; CHECK: bl sqrtf
|
||||
%result = call float @llvm.sqrt.f32(float %F)
|
||||
ret float %result
|
||||
}
|
||||
|
@ -1,13 +1,9 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: not grep add %t1.s
|
||||
; RUN: not grep ldaw %t1.s
|
||||
; RUN: not grep lda16 %t1.s
|
||||
; RUN: grep "stw" %t1.s | count 2
|
||||
; RUN: grep "st16" %t1.s | count 1
|
||||
; RUN: grep "st8" %t1.s | count 1
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
|
||||
define void @store32(i32* %p, i32 %offset, i32 %val) nounwind {
|
||||
entry:
|
||||
; CHECK: store32:
|
||||
; CHECK: stw r2, r0[r1]
|
||||
%0 = getelementptr i32* %p, i32 %offset
|
||||
store i32 %val, i32* %0, align 4
|
||||
ret void
|
||||
@ -15,6 +11,8 @@ entry:
|
||||
|
||||
define void @store32_imm(i32* %p, i32 %val) nounwind {
|
||||
entry:
|
||||
; CHECK: store32_imm:
|
||||
; CHECK: stw r1, r0[11]
|
||||
%0 = getelementptr i32* %p, i32 11
|
||||
store i32 %val, i32* %0, align 4
|
||||
ret void
|
||||
@ -22,6 +20,8 @@ entry:
|
||||
|
||||
define void @store16(i16* %p, i32 %offset, i16 %val) nounwind {
|
||||
entry:
|
||||
; CHECK: store16:
|
||||
; CHECK: st16 r2, r0[r1]
|
||||
%0 = getelementptr i16* %p, i32 %offset
|
||||
store i16 %val, i16* %0, align 2
|
||||
ret void
|
||||
@ -29,6 +29,8 @@ entry:
|
||||
|
||||
define void @store8(i8* %p, i32 %offset, i8 %val) nounwind {
|
||||
entry:
|
||||
; CHECK: store8:
|
||||
; CHECK: st8 r2, r0[r1]
|
||||
%0 = getelementptr i8* %p, i32 %offset
|
||||
store i8 %val, i8* %0, align 1
|
||||
ret void
|
||||
|
@ -1,8 +1,9 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: grep "ecallf" %t1.s | count 1
|
||||
; RUN: grep "ldc" %t1.s | count 1
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
define i32 @test() noreturn nounwind {
|
||||
entry:
|
||||
; CHECK: test:
|
||||
; CHECK: ldc
|
||||
; CHECK: ecallf
|
||||
tail call void @llvm.trap( )
|
||||
unreachable
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
; RUN: llc < %s -march=xcore > %t1.s
|
||||
; RUN: grep "bl memmove" %t1.s | count 1
|
||||
; RUN: grep "ldc r., 8" %t1.s | count 1
|
||||
; RUN: llc < %s -march=xcore | FileCheck %s
|
||||
|
||||
; Unaligned load / store pair. Should be combined into a memmove
|
||||
; of size 8
|
||||
define void @f(i64* %dst, i64* %src) nounwind {
|
||||
entry:
|
||||
; CHECK: f:
|
||||
; CHECK: ldc r2, 8
|
||||
; CHECK: bl memmove
|
||||
%0 = load i64* %src, align 1
|
||||
store i64 %0, i64* %dst, align 1
|
||||
ret void
|
||||
|
Loading…
Reference in New Issue
Block a user