Add nounwind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50837 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2008-05-07 22:59:08 +00:00
parent 0b12ecf6ff
commit 687bcb2be0
25 changed files with 39 additions and 58 deletions

View File

@ -1,6 +1,6 @@
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
define <4 x float> @opRSQ(<4 x float> %a) {
define <4 x float> @opRSQ(<4 x float> %a) nounwind {
entry:
%tmp2 = extractelement <4 x float> %a, i32 3 ; <float> [#uses=2]
%abscond = fcmp oge float %tmp2, -0.000000e+00 ; <i1> [#uses=1]

View File

@ -16,7 +16,7 @@
;
; Which is ugly. We need to fix this.
define <2 x i32> @qux(i32 %A) {
define <2 x i32> @qux(i32 %A) nounwind {
entry:
%tmp3 = insertelement <2 x i32> < i32 0, i32 undef >, i32 %A, i32 1 ; <<2 x i32>> [#uses=1]
ret <2 x i32> %tmp3

View File

@ -1,13 +1,11 @@
; RUN: llvm-as < %s | llc -march=x86-64 | not grep mov
define <4 x float> @foo(<4 x float>* %p, <4 x float> %x)
{
define <4 x float> @foo(<4 x float>* %p, <4 x float> %x) nounwind {
%t = load <4 x float>* %p
%z = mul <4 x float> %t, %x
ret <4 x float> %z
}
define <2 x double> @bar(<2 x double>* %p, <2 x double> %x)
{
define <2 x double> @bar(<2 x double>* %p, <2 x double> %x) nounwind {
%t = load <2 x double>* %p
%z = mul <2 x double> %t, %x
ret <2 x double> %z

View File

@ -1,12 +1,10 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep movap | count 2
define <4 x float> @foo(<4 x float>* %p)
{
define <4 x float> @foo(<4 x float>* %p) nounwind {
%t = load <4 x float>* %p
ret <4 x float> %t
}
define <2 x double> @bar(<2 x double>* %p)
{
define <2 x double> @bar(<2 x double>* %p) nounwind {
%t = load <2 x double>* %p
ret <2 x double> %t
}

View File

@ -1,7 +1,6 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep movups | count 1
define <2 x i64> @bar(<2 x i64>* %p)
{
define <2 x i64> @bar(<2 x i64>* %p) nounwind {
%t = load <2 x i64>* %p, align 8
ret <2 x i64> %t
}

View File

@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah -mtriple=i686-apple-darwin8 | grep movaps
; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah -mtriple=linux | grep movups
define <4 x float> @foo(float %a, float %b, float %c, float %d) {
define <4 x float> @foo(float %a, float %b, float %c, float %d) nounwind {
entry:
%tmp6 = insertelement <4 x float> undef, float %a, i32 0
%tmp7 = insertelement <4 x float> %tmp6, float %b, i32 1

View File

@ -4,8 +4,7 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep pd | count 4
; RUN: llvm-as < %s | llc -march=x86-64 | grep movup | count 4
define <4 x float> @a(<4 x float>* %y)
{
define <4 x float> @a(<4 x float>* %y) nounwind {
%x = load <4 x float>* %y, align 4
%a = extractelement <4 x float> %x, i32 0
%b = extractelement <4 x float> %x, i32 1
@ -17,8 +16,7 @@ define <4 x float> @a(<4 x float>* %y)
%s = insertelement <4 x float> %r, float %a, i32 3
ret <4 x float> %s
}
define <4 x float> @b(<4 x float>* %y, <4 x float> %z)
{
define <4 x float> @b(<4 x float>* %y, <4 x float> %z) nounwind {
%x = load <4 x float>* %y, align 4
%a = extractelement <4 x float> %x, i32 2
%b = extractelement <4 x float> %x, i32 3

View File

@ -1,13 +1,11 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep movup | count 2
define <4 x float> @foo(<4 x float>* %p, <4 x float> %x)
{
define <4 x float> @foo(<4 x float>* %p, <4 x float> %x) nounwind {
%t = load <4 x float>* %p, align 4
%z = mul <4 x float> %t, %x
ret <4 x float> %z
}
define <2 x double> @bar(<2 x double>* %p, <2 x double> %x)
{
define <2 x double> @bar(<2 x double>* %p, <2 x double> %x) nounwind {
%t = load <2 x double>* %p, align 8
%z = mul <2 x double> %t, %x
ret <2 x double> %z

View File

@ -1,12 +1,10 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep movap | count 2
define void @foo(<4 x float>* %p, <4 x float> %x)
{
define void @foo(<4 x float>* %p, <4 x float> %x) nounwind {
store <4 x float> %x, <4 x float>* %p
ret void
}
define void @bar(<2 x double>* %p, <2 x double> %x)
{
define void @bar(<2 x double>* %p, <2 x double> %x) nounwind {
store <2 x double> %x, <2 x double>* %p
ret void
}

View File

@ -1,12 +1,10 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep movup | count 2
define void @foo(<4 x float>* %p, <4 x float> %x)
{
define void @foo(<4 x float>* %p, <4 x float> %x) nounwind {
store <4 x float> %x, <4 x float>* %p, align 4
ret void
}
define void @bar(<2 x double>* %p, <2 x double> %x)
{
define void @bar(<2 x double>* %p, <2 x double> %x) nounwind {
store <2 x double> %x, <2 x double>* %p, align 8
ret void
}

View File

@ -1,7 +1,6 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep movaps | count 1
define <2 x i64> @bar(<2 x i64>* %p)
{
define <2 x i64> @bar(<2 x i64>* %p) nounwind {
%t = load <2 x i64>* %p
ret <2 x i64> %t
}

View File

@ -1,7 +1,6 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep movups | count 1
define <2 x i64> @bar(<2 x i64>* %p, <2 x i64> %x)
{
define <2 x i64> @bar(<2 x i64>* %p, <2 x i64> %x) nounwind {
%t = load <2 x i64>* %p, align 8
%z = mul <2 x i64> %t, %x
ret <2 x i64> %z

View File

@ -1,7 +1,6 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep movaps | count 1
define void @bar(<2 x i64>* %p, <2 x i64> %x)
{
define void @bar(<2 x i64>* %p, <2 x i64> %x) nounwind {
store <2 x i64> %x, <2 x i64>* %p
ret void
}

View File

@ -1,7 +1,6 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep movups | count 1
define void @bar(<2 x i64>* %p, <2 x i64> %x)
{
define void @bar(<2 x i64>* %p, <2 x i64> %x) nounwind {
store <2 x i64> %x, <2 x i64>* %p, align 8
ret void
}

View File

@ -1,12 +1,10 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep movup | count 2
define <4 x float> @foo(<4 x float>* %p)
{
define <4 x float> @foo(<4 x float>* %p) nounwind {
%t = load <4 x float>* %p, align 4
ret <4 x float> %t
}
define <2 x double> @bar(<2 x double>* %p)
{
define <2 x double> @bar(<2 x double>* %p) nounwind {
%t = load <2 x double>* %p, align 8
ret <2 x double> %t
}

View File

@ -7,7 +7,7 @@ target triple = "i686-apple-darwin8"
@G = external global { float,float,float,float}, align 16
define %f4 @test1(float %W, float %X, float %Y, float %Z) {
define %f4 @test1(float %W, float %X, float %Y, float %Z) nounwind {
%tmp = insertelement %f4 undef, float %W, i32 0
%tmp2 = insertelement %f4 %tmp, float %X, i32 1
%tmp4 = insertelement %f4 %tmp2, float %Y, i32 2
@ -15,7 +15,7 @@ define %f4 @test1(float %W, float %X, float %Y, float %Z) {
ret %f4 %tmp6
}
define %f4 @test2() {
define %f4 @test2() nounwind {
%Wp = getelementptr { float,float,float,float}* @G, i32 0, i32 0
%Xp = getelementptr { float,float,float,float}* @G, i32 0, i32 1
%Yp = getelementptr { float,float,float,float}* @G, i32 0, i32 2

View File

@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movss | count 1
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movd | count 1
define <4 x float> @test1(float %a) {
define <4 x float> @test1(float %a) nounwind {
%tmp = insertelement <4 x float> zeroinitializer, float %a, i32 0 ; <<4 x float>> [#uses=1]
%tmp5 = insertelement <4 x float> %tmp, float 0.000000e+00, i32 1 ; <<4 x float>> [#uses=1]
%tmp6 = insertelement <4 x float> %tmp5, float 0.000000e+00, i32 2 ; <<4 x float>> [#uses=1]
@ -9,7 +9,7 @@ define <4 x float> @test1(float %a) {
ret <4 x float> %tmp7
}
define <2 x i64> @test(i32 %a) {
define <2 x i64> @test(i32 %a) nounwind {
%tmp = insertelement <4 x i32> zeroinitializer, i32 %a, i32 0 ; <<8 x i16>> [#uses=1]
%tmp6 = insertelement <4 x i32> %tmp, i32 0, i32 1 ; <<8 x i32>> [#uses=1]
%tmp8 = insertelement <4 x i32> %tmp6, i32 0, i32 2 ; <<8 x i32>> [#uses=1]

View File

@ -1,6 +1,6 @@
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pinsrw | count 2
define <2 x i64> @test(i16 %a) {
define <2 x i64> @test(i16 %a) nounwind {
entry:
%tmp10 = insertelement <8 x i16> zeroinitializer, i16 %a, i32 3 ; <<8 x i16>> [#uses=1]
%tmp12 = insertelement <8 x i16> %tmp10, i16 0, i32 4 ; <<8 x i16>> [#uses=1]
@ -11,7 +11,7 @@ entry:
ret <2 x i64> %tmp19
}
define <2 x i64> @test2(i8 %a) {
define <2 x i64> @test2(i8 %a) nounwind {
entry:
%tmp24 = insertelement <16 x i8> zeroinitializer, i8 %a, i32 10 ; <<16 x i8>> [#uses=1]
%tmp26 = insertelement <16 x i8> %tmp24, i8 0, i32 11 ; <<16 x i8>> [#uses=1]

View File

@ -4,7 +4,7 @@
; RUN: grep punpckldq %t | count 1
; RUN: grep movq %t | count 1
define <4 x float> @test1(float %a, float %b) {
define <4 x float> @test1(float %a, float %b) nounwind {
%tmp = insertelement <4 x float> zeroinitializer, float %a, i32 0 ; <<4 x float>> [#uses=1]
%tmp6 = insertelement <4 x float> %tmp, float 0.000000e+00, i32 1 ; <<4 x float>> [#uses=1]
%tmp8 = insertelement <4 x float> %tmp6, float %b, i32 2 ; <<4 x float>> [#uses=1]
@ -12,7 +12,7 @@ define <4 x float> @test1(float %a, float %b) {
ret <4 x float> %tmp9
}
define <4 x float> @test2(float %a, float %b) {
define <4 x float> @test2(float %a, float %b) nounwind {
%tmp = insertelement <4 x float> zeroinitializer, float %a, i32 0 ; <<4 x float>> [#uses=1]
%tmp7 = insertelement <4 x float> %tmp, float %b, i32 1 ; <<4 x float>> [#uses=1]
%tmp8 = insertelement <4 x float> %tmp7, float 0.000000e+00, i32 2 ; <<4 x float>> [#uses=1]
@ -20,7 +20,7 @@ define <4 x float> @test2(float %a, float %b) {
ret <4 x float> %tmp9
}
define <2 x i64> @test3(i32 %a, i32 %b) {
define <2 x i64> @test3(i32 %a, i32 %b) nounwind {
%tmp = insertelement <4 x i32> zeroinitializer, i32 %a, i32 0 ; <<4 x i32>> [#uses=1]
%tmp6 = insertelement <4 x i32> %tmp, i32 %b, i32 1 ; <<4 x i32>> [#uses=1]
%tmp8 = insertelement <4 x i32> %tmp6, i32 0, i32 2 ; <<4 x i32>> [#uses=1]

View File

@ -1,6 +1,6 @@
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movsd | count 1
define <2 x i64> @test(<2 x i64>* %p) {
define <2 x i64> @test(<2 x i64>* %p) nounwind {
%tmp = bitcast <2 x i64>* %p to double*
%tmp.upgrd.1 = load double* %tmp
%tmp.upgrd.2 = insertelement <2 x double> undef, double %tmp.upgrd.1, i32 0

View File

@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep movd | count 1
; RUN: llvm-as < %s | llc -march=x86-64 | grep {punpcklqdq.*%xmm0, %xmm0}
define <2 x i64> @test3(i64 %A) {
define <2 x i64> @test3(i64 %A) nounwind {
entry:
%B = insertelement <2 x i64> undef, i64 %A, i32 1
ret <2 x i64> %B

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep {movl.*\$1, %}
define <2 x i64> @test1() {
define <2 x i64> @test1() nounwind {
entry:
ret <2 x i64> < i64 1, i64 0 >
}

View File

@ -8,14 +8,14 @@
; movd %eax, %xmm0
; ret
define <2 x i64> @test3(i64 %arg) {
define <2 x i64> @test3(i64 %arg) nounwind {
entry:
%A = and i64 %arg, 1234567
%B = insertelement <2 x i64> zeroinitializer, i64 %A, i32 0
ret <2 x i64> %B
}
define <2 x i64> @test2(i64 %arg) {
define <2 x i64> @test2(i64 %arg) nounwind {
entry:
%A = and i64 %arg, 1234567
%B = insertelement <2 x i64> undef, i64 %A, i32 0

View File

@ -1,6 +1,6 @@
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep punpckl | count 7
define void @test(<8 x i16>* %b, i16 %a0, i16 %a1, i16 %a2, i16 %a3, i16 %a4, i16 %a5, i16 %a6, i16 %a7) {
define void @test(<8 x i16>* %b, i16 %a0, i16 %a1, i16 %a2, i16 %a3, i16 %a4, i16 %a5, i16 %a6, i16 %a7) nounwind {
%tmp = insertelement <8 x i16> zeroinitializer, i16 %a0, i32 0 ; <<8 x i16>> [#uses=1]
%tmp2 = insertelement <8 x i16> %tmp, i16 %a1, i32 1 ; <<8 x i16>> [#uses=1]
%tmp4 = insertelement <8 x i16> %tmp2, i16 %a2, i32 2 ; <<8 x i16>> [#uses=1]

View File

@ -5,7 +5,7 @@
target datalayout = "e-p:32:32"
target triple = "i686-apple-darwin8.7.2"
define i16 @test1(float %f) {
define i16 @test1(float %f) nounwind {
%tmp = insertelement <4 x float> undef, float %f, i32 0 ; <<4 x float>> [#uses=1]
%tmp10 = insertelement <4 x float> %tmp, float 0.000000e+00, i32 1 ; <<4 x float>> [#uses=1]
%tmp11 = insertelement <4 x float> %tmp10, float 0.000000e+00, i32 2 ; <<4 x float>> [#uses=1]
@ -19,7 +19,7 @@ define i16 @test1(float %f) {
ret i16 %tmp69
}
define i16 @test2(float %f) {
define i16 @test2(float %f) nounwind {
%tmp28 = sub float %f, 1.000000e+00 ; <float> [#uses=1]
%tmp37 = mul float %tmp28, 5.000000e-01 ; <float> [#uses=1]
%tmp375 = insertelement <4 x float> undef, float %tmp37, i32 0 ; <<4 x float>> [#uses=1]