; 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]
;
; 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
; 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
; 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
}
; 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
}
; 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
; 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
%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
; 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
; 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
}
; 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
}
; 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
}
; 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
; 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
}
; 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
}
; 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
}
@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
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
; 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]
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]
; 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]
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]
; 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]
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]
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]
; 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
; 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
; 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 >
}
; 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
; 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]
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]
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]