Fix tests to use fadd, fsub, and fmul, instead of add, sub, and mul,
authorDan Gohman <gohman@apple.com>
Mon, 3 May 2010 22:36:46 +0000 (22:36 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 3 May 2010 22:36:46 +0000 (22:36 +0000)
when the type is floating-point.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102969 91177308-0d34-0410-b5e6-96231b3b80d8

15 files changed:
test/CodeGen/ARM/vadd.ll
test/CodeGen/ARM/vld2.ll
test/CodeGen/ARM/vld3.ll
test/CodeGen/ARM/vld4.ll
test/CodeGen/ARM/vldlane.ll
test/CodeGen/ARM/vmla.ll
test/CodeGen/ARM/vmls.ll
test/CodeGen/ARM/vmul.ll
test/CodeGen/ARM/vneg.ll
test/CodeGen/ARM/vsub.ll
test/CodeGen/ARM/vtrn.ll
test/CodeGen/ARM/vuzp.ll
test/CodeGen/ARM/vzip.ll
test/CodeGen/X86/2010-01-07-UAMemFeature.ll
test/CodeGen/X86/stack-align.ll

index 9fa530750aa16298e888fa96918a78e030322362..9bb8bf56104536ac7858b1379e193ae7e4ffac68 100644 (file)
@@ -41,7 +41,7 @@ define <2 x float> @vaddf32(<2 x float>* %A, <2 x float>* %B) nounwind {
 ;CHECK: vadd.f32
        %tmp1 = load <2 x float>* %A
        %tmp2 = load <2 x float>* %B
-       %tmp3 = add <2 x float> %tmp1, %tmp2
+       %tmp3 = fadd <2 x float> %tmp1, %tmp2
        ret <2 x float> %tmp3
 }
 
@@ -86,7 +86,7 @@ define <4 x float> @vaddQf32(<4 x float>* %A, <4 x float>* %B) nounwind {
 ;CHECK: vadd.f32
        %tmp1 = load <4 x float>* %A
        %tmp2 = load <4 x float>* %B
-       %tmp3 = add <4 x float> %tmp1, %tmp2
+       %tmp3 = fadd <4 x float> %tmp1, %tmp2
        ret <4 x float> %tmp3
 }
 
index f5dc06cb302e0f587a634dc3621422a1a32c2104..0838636ce7421f5091e0ac1c114af081ff8e96a7 100644 (file)
@@ -50,7 +50,7 @@ define <2 x float> @vld2f(float* %A) nounwind {
        %tmp1 = call %struct.__neon_float32x2x2_t @llvm.arm.neon.vld2.v2f32(i8* %tmp0)
         %tmp2 = extractvalue %struct.__neon_float32x2x2_t %tmp1, 0
         %tmp3 = extractvalue %struct.__neon_float32x2x2_t %tmp1, 1
-        %tmp4 = add <2 x float> %tmp2, %tmp3
+        %tmp4 = fadd <2 x float> %tmp2, %tmp3
        ret <2 x float> %tmp4
 }
 
@@ -104,7 +104,7 @@ define <4 x float> @vld2Qf(float* %A) nounwind {
        %tmp1 = call %struct.__neon_float32x4x2_t @llvm.arm.neon.vld2.v4f32(i8* %tmp0)
         %tmp2 = extractvalue %struct.__neon_float32x4x2_t %tmp1, 0
         %tmp3 = extractvalue %struct.__neon_float32x4x2_t %tmp1, 1
-        %tmp4 = add <4 x float> %tmp2, %tmp3
+        %tmp4 = fadd <4 x float> %tmp2, %tmp3
        ret <4 x float> %tmp4
 }
 
index 33c4d37b3ed38d42cf07db251c89b0c116fdec4e..65a24486bc62cc1411baf48c479a1f0366b0b775 100644 (file)
@@ -50,7 +50,7 @@ define <2 x float> @vld3f(float* %A) nounwind {
        %tmp1 = call %struct.__neon_float32x2x3_t @llvm.arm.neon.vld3.v2f32(i8* %tmp0)
         %tmp2 = extractvalue %struct.__neon_float32x2x3_t %tmp1, 0
         %tmp3 = extractvalue %struct.__neon_float32x2x3_t %tmp1, 2
-        %tmp4 = add <2 x float> %tmp2, %tmp3
+        %tmp4 = fadd <2 x float> %tmp2, %tmp3
        ret <2 x float> %tmp4
 }
 
@@ -108,7 +108,7 @@ define <4 x float> @vld3Qf(float* %A) nounwind {
        %tmp1 = call %struct.__neon_float32x4x3_t @llvm.arm.neon.vld3.v4f32(i8* %tmp0)
         %tmp2 = extractvalue %struct.__neon_float32x4x3_t %tmp1, 0
         %tmp3 = extractvalue %struct.__neon_float32x4x3_t %tmp1, 2
-        %tmp4 = add <4 x float> %tmp2, %tmp3
+        %tmp4 = fadd <4 x float> %tmp2, %tmp3
        ret <4 x float> %tmp4
 }
 
index e800cb539aa4b06dc20356a95dd4aa5d44602d1b..e0b870638a182738fde08f25a6de0730f4722997 100644 (file)
@@ -50,7 +50,7 @@ define <2 x float> @vld4f(float* %A) nounwind {
        %tmp1 = call %struct.__neon_float32x2x4_t @llvm.arm.neon.vld4.v2f32(i8* %tmp0)
         %tmp2 = extractvalue %struct.__neon_float32x2x4_t %tmp1, 0
         %tmp3 = extractvalue %struct.__neon_float32x2x4_t %tmp1, 2
-        %tmp4 = add <2 x float> %tmp2, %tmp3
+        %tmp4 = fadd <2 x float> %tmp2, %tmp3
        ret <2 x float> %tmp4
 }
 
@@ -108,7 +108,7 @@ define <4 x float> @vld4Qf(float* %A) nounwind {
        %tmp1 = call %struct.__neon_float32x4x4_t @llvm.arm.neon.vld4.v4f32(i8* %tmp0)
         %tmp2 = extractvalue %struct.__neon_float32x4x4_t %tmp1, 0
         %tmp3 = extractvalue %struct.__neon_float32x4x4_t %tmp1, 2
-        %tmp4 = add <4 x float> %tmp2, %tmp3
+        %tmp4 = fadd <4 x float> %tmp2, %tmp3
        ret <4 x float> %tmp4
 }
 
index 46a200220f690143fbb7d58c208b5db5d1746535..b32c59019f4cbea802605350ff8431683c1f3462 100644 (file)
@@ -52,7 +52,7 @@ define <2 x float> @vld2lanef(float* %A, <2 x float>* %B) nounwind {
        %tmp2 = call %struct.__neon_float32x2x2_t @llvm.arm.neon.vld2lane.v2f32(i8* %tmp0, <2 x float> %tmp1, <2 x float> %tmp1, i32 1)
         %tmp3 = extractvalue %struct.__neon_float32x2x2_t %tmp2, 0
         %tmp4 = extractvalue %struct.__neon_float32x2x2_t %tmp2, 1
-        %tmp5 = add <2 x float> %tmp3, %tmp4
+        %tmp5 = fadd <2 x float> %tmp3, %tmp4
        ret <2 x float> %tmp5
 }
 
@@ -88,7 +88,7 @@ define <4 x float> @vld2laneQf(float* %A, <4 x float>* %B) nounwind {
        %tmp2 = call %struct.__neon_float32x4x2_t @llvm.arm.neon.vld2lane.v4f32(i8* %tmp0, <4 x float> %tmp1, <4 x float> %tmp1, i32 1)
         %tmp3 = extractvalue %struct.__neon_float32x4x2_t %tmp2, 0
         %tmp4 = extractvalue %struct.__neon_float32x4x2_t %tmp2, 1
-        %tmp5 = add <4 x float> %tmp3, %tmp4
+        %tmp5 = fadd <4 x float> %tmp3, %tmp4
        ret <4 x float> %tmp5
 }
 
@@ -160,8 +160,8 @@ define <2 x float> @vld3lanef(float* %A, <2 x float>* %B) nounwind {
         %tmp3 = extractvalue %struct.__neon_float32x2x3_t %tmp2, 0
         %tmp4 = extractvalue %struct.__neon_float32x2x3_t %tmp2, 1
         %tmp5 = extractvalue %struct.__neon_float32x2x3_t %tmp2, 2
-        %tmp6 = add <2 x float> %tmp3, %tmp4
-        %tmp7 = add <2 x float> %tmp5, %tmp6
+        %tmp6 = fadd <2 x float> %tmp3, %tmp4
+        %tmp7 = fadd <2 x float> %tmp5, %tmp6
        ret <2 x float> %tmp7
 }
 
@@ -202,8 +202,8 @@ define <4 x float> @vld3laneQf(float* %A, <4 x float>* %B) nounwind {
         %tmp3 = extractvalue %struct.__neon_float32x4x3_t %tmp2, 0
         %tmp4 = extractvalue %struct.__neon_float32x4x3_t %tmp2, 1
         %tmp5 = extractvalue %struct.__neon_float32x4x3_t %tmp2, 2
-        %tmp6 = add <4 x float> %tmp3, %tmp4
-        %tmp7 = add <4 x float> %tmp5, %tmp6
+        %tmp6 = fadd <4 x float> %tmp3, %tmp4
+        %tmp7 = fadd <4 x float> %tmp5, %tmp6
        ret <4 x float> %tmp7
 }
 
@@ -282,9 +282,9 @@ define <2 x float> @vld4lanef(float* %A, <2 x float>* %B) nounwind {
         %tmp4 = extractvalue %struct.__neon_float32x2x4_t %tmp2, 1
         %tmp5 = extractvalue %struct.__neon_float32x2x4_t %tmp2, 2
         %tmp6 = extractvalue %struct.__neon_float32x2x4_t %tmp2, 3
-        %tmp7 = add <2 x float> %tmp3, %tmp4
-        %tmp8 = add <2 x float> %tmp5, %tmp6
-        %tmp9 = add <2 x float> %tmp7, %tmp8
+        %tmp7 = fadd <2 x float> %tmp3, %tmp4
+        %tmp8 = fadd <2 x float> %tmp5, %tmp6
+        %tmp9 = fadd <2 x float> %tmp7, %tmp8
        ret <2 x float> %tmp9
 }
 
@@ -330,9 +330,9 @@ define <4 x float> @vld4laneQf(float* %A, <4 x float>* %B) nounwind {
         %tmp4 = extractvalue %struct.__neon_float32x4x4_t %tmp2, 1
         %tmp5 = extractvalue %struct.__neon_float32x4x4_t %tmp2, 2
         %tmp6 = extractvalue %struct.__neon_float32x4x4_t %tmp2, 3
-        %tmp7 = add <4 x float> %tmp3, %tmp4
-        %tmp8 = add <4 x float> %tmp5, %tmp6
-        %tmp9 = add <4 x float> %tmp7, %tmp8
+        %tmp7 = fadd <4 x float> %tmp3, %tmp4
+        %tmp8 = fadd <4 x float> %tmp5, %tmp6
+        %tmp9 = fadd <4 x float> %tmp7, %tmp8
        ret <4 x float> %tmp9
 }
 
index 840521827413a2da4063d838445e88309a384b89..77cf10ad3e684f588facedd056ec0b9601c58647 100644 (file)
@@ -39,8 +39,8 @@ define <2 x float> @vmlaf32(<2 x float>* %A, <2 x float>* %B, <2 x float>* %C) n
        %tmp1 = load <2 x float>* %A
        %tmp2 = load <2 x float>* %B
        %tmp3 = load <2 x float>* %C
-       %tmp4 = mul <2 x float> %tmp2, %tmp3
-       %tmp5 = add <2 x float> %tmp1, %tmp4
+       %tmp4 = fmul <2 x float> %tmp2, %tmp3
+       %tmp5 = fadd <2 x float> %tmp1, %tmp4
        ret <2 x float> %tmp5
 }
 
@@ -83,8 +83,8 @@ define <4 x float> @vmlaQf32(<4 x float>* %A, <4 x float>* %B, <4 x float>* %C)
        %tmp1 = load <4 x float>* %A
        %tmp2 = load <4 x float>* %B
        %tmp3 = load <4 x float>* %C
-       %tmp4 = mul <4 x float> %tmp2, %tmp3
-       %tmp5 = add <4 x float> %tmp1, %tmp4
+       %tmp4 = fmul <4 x float> %tmp2, %tmp3
+       %tmp5 = fadd <4 x float> %tmp1, %tmp4
        ret <4 x float> %tmp5
 }
 
index c89552e6f9eaa4fc8842e9f977570563ee7e8450..2b70a7878ced5d9dbadf70ff95c28948435f11f2 100644 (file)
@@ -39,8 +39,8 @@ define <2 x float> @vmlsf32(<2 x float>* %A, <2 x float>* %B, <2 x float>* %C) n
        %tmp1 = load <2 x float>* %A
        %tmp2 = load <2 x float>* %B
        %tmp3 = load <2 x float>* %C
-       %tmp4 = mul <2 x float> %tmp2, %tmp3
-       %tmp5 = sub <2 x float> %tmp1, %tmp4
+       %tmp4 = fmul <2 x float> %tmp2, %tmp3
+       %tmp5 = fsub <2 x float> %tmp1, %tmp4
        ret <2 x float> %tmp5
 }
 
@@ -83,8 +83,8 @@ define <4 x float> @vmlsQf32(<4 x float>* %A, <4 x float>* %B, <4 x float>* %C)
        %tmp1 = load <4 x float>* %A
        %tmp2 = load <4 x float>* %B
        %tmp3 = load <4 x float>* %C
-       %tmp4 = mul <4 x float> %tmp2, %tmp3
-       %tmp5 = sub <4 x float> %tmp1, %tmp4
+       %tmp4 = fmul <4 x float> %tmp2, %tmp3
+       %tmp5 = fsub <4 x float> %tmp1, %tmp4
        ret <4 x float> %tmp5
 }
 
index 325da5deabe514a27afe06bd6b07fdd92572c375..1d91680212794e1e2b8516df18f4ade336abed00 100644 (file)
@@ -32,7 +32,7 @@ define <2 x float> @vmulf32(<2 x float>* %A, <2 x float>* %B) nounwind {
 ;CHECK: vmul.f32
        %tmp1 = load <2 x float>* %A
        %tmp2 = load <2 x float>* %B
-       %tmp3 = mul <2 x float> %tmp1, %tmp2
+       %tmp3 = fmul <2 x float> %tmp1, %tmp2
        ret <2 x float> %tmp3
 }
 
@@ -77,7 +77,7 @@ define <4 x float> @vmulQf32(<4 x float>* %A, <4 x float>* %B) nounwind {
 ;CHECK: vmul.f32
        %tmp1 = load <4 x float>* %A
        %tmp2 = load <4 x float>* %B
-       %tmp3 = mul <4 x float> %tmp1, %tmp2
+       %tmp3 = fmul <4 x float> %tmp1, %tmp2
        ret <4 x float> %tmp3
 }
 
index 7764e87c6ac6b5936b6125dfd0abda3c508552d6..4a10732458e8c89c93ac25cdeb59775b9236639a 100644 (file)
@@ -28,7 +28,7 @@ define <2 x float> @vnegf32(<2 x float>* %A) nounwind {
 ;CHECK: vnegf32:
 ;CHECK: vneg.f32
        %tmp1 = load <2 x float>* %A
-       %tmp2 = sub <2 x float> < float -0.000000e+00, float -0.000000e+00 >, %tmp1
+       %tmp2 = fsub <2 x float> < float -0.000000e+00, float -0.000000e+00 >, %tmp1
        ret <2 x float> %tmp2
 }
 
@@ -60,7 +60,7 @@ define <4 x float> @vnegQf32(<4 x float>* %A) nounwind {
 ;CHECK: vnegQf32:
 ;CHECK: vneg.f32
        %tmp1 = load <4 x float>* %A
-       %tmp2 = sub <4 x float> < float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00 >, %tmp1
+       %tmp2 = fsub <4 x float> < float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00 >, %tmp1
        ret <4 x float> %tmp2
 }
 
index 8f0055fd41037dd0e675b2051e9f3f79f4f09be0..3416de76f123e783010f409708c8f8e829236888 100644 (file)
@@ -41,7 +41,7 @@ define <2 x float> @vsubf32(<2 x float>* %A, <2 x float>* %B) nounwind {
 ;CHECK: vsub.f32
        %tmp1 = load <2 x float>* %A
        %tmp2 = load <2 x float>* %B
-       %tmp3 = sub <2 x float> %tmp1, %tmp2
+       %tmp3 = fsub <2 x float> %tmp1, %tmp2
        ret <2 x float> %tmp3
 }
 
@@ -86,7 +86,7 @@ define <4 x float> @vsubQf32(<4 x float>* %A, <4 x float>* %B) nounwind {
 ;CHECK: vsub.f32
        %tmp1 = load <4 x float>* %A
        %tmp2 = load <4 x float>* %B
-       %tmp3 = sub <4 x float> %tmp1, %tmp2
+       %tmp3 = fsub <4 x float> %tmp1, %tmp2
        ret <4 x float> %tmp3
 }
 
index 5122b0981e961c82579cac0847d6b8670ffb1380..10bb10ac24a176f494ea0e8d1ac7e2fcde1c265e 100644 (file)
@@ -44,7 +44,7 @@ define <2 x float> @vtrnf(<2 x float>* %A, <2 x float>* %B) nounwind {
        %tmp2 = load <2 x float>* %B
        %tmp3 = shufflevector <2 x float> %tmp1, <2 x float> %tmp2, <2 x i32> <i32 0, i32 2>
        %tmp4 = shufflevector <2 x float> %tmp1, <2 x float> %tmp2, <2 x i32> <i32 1, i32 3>
-        %tmp5 = add <2 x float> %tmp3, %tmp4
+        %tmp5 = fadd <2 x float> %tmp3, %tmp4
        ret <2 x float> %tmp5
 }
 
@@ -92,6 +92,6 @@ define <4 x float> @vtrnQf(<4 x float>* %A, <4 x float>* %B) nounwind {
        %tmp2 = load <4 x float>* %B
        %tmp3 = shufflevector <4 x float> %tmp1, <4 x float> %tmp2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
        %tmp4 = shufflevector <4 x float> %tmp1, <4 x float> %tmp2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
-        %tmp5 = add <4 x float> %tmp3, %tmp4
+        %tmp5 = fadd <4 x float> %tmp3, %tmp4
        ret <4 x float> %tmp5
 }
index e531718d94aa1585bc75240cd398c2a927cea23a..6cef188d76dd4f0e63066d93a7ebeb661a38e691 100644 (file)
@@ -70,6 +70,6 @@ define <4 x float> @vuzpQf(<4 x float>* %A, <4 x float>* %B) nounwind {
        %tmp2 = load <4 x float>* %B
        %tmp3 = shufflevector <4 x float> %tmp1, <4 x float> %tmp2, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
        %tmp4 = shufflevector <4 x float> %tmp1, <4 x float> %tmp2, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
-        %tmp5 = add <4 x float> %tmp3, %tmp4
+        %tmp5 = fadd <4 x float> %tmp3, %tmp4
        ret <4 x float> %tmp5
 }
index 32f7e0d02c446764a49d9046d8fd463e24d0669b..a9ecdcab42d7e00e00918b4406cf773de90bda0d 100644 (file)
@@ -70,6 +70,6 @@ define <4 x float> @vzipQf(<4 x float>* %A, <4 x float>* %B) nounwind {
        %tmp2 = load <4 x float>* %B
        %tmp3 = shufflevector <4 x float> %tmp1, <4 x float> %tmp2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
        %tmp4 = shufflevector <4 x float> %tmp1, <4 x float> %tmp2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
-        %tmp5 = add <4 x float> %tmp3, %tmp4
+        %tmp5 = fadd <4 x float> %tmp3, %tmp4
        ret <4 x float> %tmp5
 }
index 3728f15d969c6f461c7345d586d86b76df736f3f..bb24adb41817d4bb7d47a4d496cbb984b2509e0d 100644 (file)
@@ -6,6 +6,6 @@ target triple = "x86_64-unknown-linux-gnu"
 
 define <4 x float> @foo(<4 x float>* %P, <4 x float> %In) nounwind {
        %A = load <4 x float>* %P, align 4
-       %B = add <4 x float> %A, %In
+       %B = fadd <4 x float> %A, %In
        ret <4 x float> %B
 }
index e971ef70dbd4a65d06804b9f22afd8c93102a975..271ad1aad0ba91e616115569de5fe6bc0682e374 100644 (file)
@@ -31,7 +31,7 @@ define <2 x double> @test3(<2 x double> %x, <2 x double> %y) alignstack(32) {
 entry:
     ; CHECK: andl{{.*}}$-32, %esp
     call void @test2()
-    %A = mul <2 x double> %x, %y
+    %A = fmul <2 x double> %x, %y
     ret <2 x double> %A
 }