[PowerPC] Clean up -mattr=+vsx tests to always specify -mcpu
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Sun, 19 Oct 2014 21:29:21 +0000 (21:29 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Sun, 19 Oct 2014 21:29:21 +0000 (21:29 +0000)
We recently discovered an issue that reinforces what a good idea it is
to always specify -mcpu in our code generation tests, particularly for
-mattr=+vsx.  This patch ensures that all tests that specify
-mattr=+vsx also specify -mcpu=pwr7 or -mcpu=pwr8, as appropriate.

Some of the uses of -mattr=+vsx added recently don't make much sense
(when specified for -mtriple=powerpc-apple-darwin8 or -march=ppc32,
for example).  For cases like this I've just removed the extra VSX
test commands; there's enough coverage without them.

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

test/CodeGen/PowerPC/2007-09-08-unaligned.ll
test/CodeGen/PowerPC/2012-10-12-bitcast.ll
test/CodeGen/PowerPC/buildvec_canonicalize.ll
test/CodeGen/PowerPC/fabs.ll
test/CodeGen/PowerPC/fnabs.ll
test/CodeGen/PowerPC/fp-branch.ll
test/CodeGen/PowerPC/fp_to_uint.ll
test/CodeGen/PowerPC/i64_fp.ll
test/CodeGen/PowerPC/unsafe-math.ll
test/CodeGen/PowerPC/vec_mul.ll
test/CodeGen/PowerPC/vrspill.ll

index 89a4b72288d2355b2b94feb08b34a58d57364256..bdd91f345718b84b4e4257e0264063e8e69c9ff6 100644 (file)
@@ -2,10 +2,6 @@
 ; RUN: llc -mattr=-vsx < %s | grep stfs | count 1
 ; RUN: llc -mattr=-vsx < %s | grep lfd | count 2
 ; RUN: llc -mattr=-vsx < %s | grep lfs | count 2
-; RUN: llc -mattr=+vsx < %s | grep stxsdx | count 3
-; RUN: llc -mattr=+vsx < %s | grep stfs | count 1
-; RUN: llc -mattr=+vsx < %s | grep lxsdx | count 2
-; RUN: llc -mattr=+vsx < %s | grep lfs | count 2
 ; ModuleID = 'foo.c'
 target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
 target triple = "powerpc-apple-darwin8"
index cd714d088f5cc265cf7e6bdbd753db79382aa12d..fdacef2cdd4d7f263a7f455bcee5039b66de1dd5 100644 (file)
@@ -1,5 +1,5 @@
-; RUN: llc -mattr=-vsx -mattr=+altivec < %s | FileCheck %s
-; RUN: llc -mattr=+vsx -mattr=+altivec < %s | FileCheck -check-prefix=CHECK-VSX %s
+; RUN: llc -mattr=-vsx -mattr=+altivec -mcpu=pwr7 < %s | FileCheck %s
+; RUN: llc -mattr=+vsx -mattr=+altivec -mcpu=pwr7 < %s | FileCheck -check-prefix=CHECK-VSX %s
 target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32:64"
 target triple = "powerpc64-unknown-linux-gnu"
 
index 37feec8e1c7860991f6942fac8e0f94f1e33a654..b70671bfd5cb787e6943be55b2377c8770963f35 100644 (file)
@@ -1,5 +1,4 @@
 ; RUN: llc < %s -mattr=-vsx -march=ppc32 -mattr=+altivec --enable-unsafe-fp-math | FileCheck %s
-; RUN: llc < %s -mattr=+vsx -march=ppc32 -mattr=+altivec --enable-unsafe-fp-math | FileCheck -check-prefix=CHECK-VSX %s
 
 define void @VXOR(<4 x float>* %P1, <4 x i32>* %P2, <4 x float>* %P3) {
         %tmp = load <4 x float>* %P3            ; <<4 x float>> [#uses=1]
@@ -15,9 +14,6 @@ define void @VXOR(<4 x float>* %P1, <4 x i32>* %P2, <4 x float>* %P3) {
 ; CHECK: @VXOR
 ; CHECK: vsplti
 ; CHECK: vxor
-; CHECK-VSX: @VXOR
-; CHECK-VSX: vxor
-; CHECK-VSX: xvmulsp
 
 define void @VSPLTI(<4 x i32>* %P2, <8 x i16>* %P3) {
         store <4 x i32> bitcast (<16 x i8> < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1 > to <4 x i32>), <4 x i32>* %P2
@@ -26,5 +22,3 @@ define void @VSPLTI(<4 x i32>* %P2, <8 x i16>* %P3) {
 }
 ; CHECK: @VSPLTI
 ; CHECK: vsplti
-; CHECK-VSX: @VSPLTI
-; CHECK-VSX: vsplti
index a093def16f5af809c4aaa434022b8cb6ff562dad..36aa23d035504b65b22eff04bf3023ed6c5a56db 100644 (file)
@@ -1,5 +1,4 @@
 ; RUN: llc < %s -mattr=-vsx -march=ppc32 -mtriple=powerpc-apple-darwin | grep "fabs f1, f1"
-; RUN: llc < %s -mattr=+vsx -march=ppc32 -mtriple=powerpc-apple-darwin | grep "xsabsdp f1, f1"
 
 define double @fabs(double %f) {
 entry:
index 0e5c7a7c417c93212f6cf83121d5cafa6fe5d21d..fc6a04e0094128d9f4f61e2ed2ee719dec7b265e 100644 (file)
@@ -1,5 +1,4 @@
 ; RUN: llc < %s -mattr=-vsx -march=ppc32 | grep fnabs
-; RUN: llc < %s -mattr=+vsx -march=ppc32 | grep xsnabsdp
 
 declare double @fabs(double)
 
index 926bb8eb1c3d120ed20c756125092be86b7d387e..f5857563745b64c4290774e224cff9b17eed2a39 100644 (file)
@@ -1,5 +1,4 @@
 ; RUN: llc < %s -mattr=-vsx -march=ppc32 | grep fcmp | count 1
-; RUN: llc < %s -mattr=+vsx -march=ppc32 | grep xscmpudp | count 1
 
 declare i1 @llvm.isunordered.f64(double, double)
 
index 21a1b7f0d69997e6e751316da76c153c321411d3..187d2d6ee1e98e657cf481fb3b37265bf962d03d 100644 (file)
@@ -1,5 +1,4 @@
 ; RUN: llc < %s -mattr=-vsx -march=ppc32 | grep fctiwz | count 1
-; RUN: llc < %s -mattr=+vsx -march=ppc32 | grep xscvdpsxws | count 1
 
 
 define i16 @foo(float %a) {
index 6c1b645b1fc090f66834e7c96bc910d2e96149f4..67f4e0bc4b69c966b9939ce6331107d1d9fc1566 100644 (file)
 ; RUN:   not grep fcfid
 ; RUN: llc < %s -mattr=-vsx -march=ppc32 -mcpu=g4 | \
 ; RUN:   not grep fctidz
-; RUN: llc < %s -mattr=+vsx -march=ppc32 -mattr=+64bit | \
-; RUN:   grep xscvdpsxds
-; RUN: llc < %s -mattr=+vsx -march=ppc32 -mattr=+64bit | \
-; RUN:   grep xscvsxddp
 
 define double @X(double %Y) {
         %A = fptosi double %Y to i64            ; <i64> [#uses=1]
index 1a269da1ac3ac8c3961ea7bff09014b75ee3285f..f6430270eac7576122705fd28828fa537feb4d7e 100644 (file)
@@ -1,9 +1,6 @@
 ; RUN: llc < %s -mattr=-vsx -march=ppc32 | grep fmul | count 2
 ; RUN: llc < %s -mattr=-vsx -march=ppc32 -enable-unsafe-fp-math | \
 ; RUN:   grep fmul | count 1
-; RUN: llc < %s -mattr=+vsx -march=ppc32 | grep xsmuldp | count 2
-; RUN: llc < %s -mattr=+vsx -march=ppc32 -enable-unsafe-fp-math | \
-; RUN:   grep xsmuldp | count 1
 
 define double @foo(double %X) nounwind {
         %tmp1 = fmul double %X, 1.23
index dee03693fc8f04a4244b4fa72a7e9a6d4627313b..86596d4b0a87a7513b783991932be398e1b0917b 100644 (file)
@@ -1,9 +1,8 @@
 ; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -march=ppc32 -mattr=+altivec -mattr=-vsx | FileCheck %s
-; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -march=ppc64 -mattr=+altivec -mattr=-vsx | FileCheck %s
-; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -march=ppc64 -mattr=+altivec -mattr=-vsx | FileCheck %s -check-prefix=CHECK-LE
-; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -march=ppc32 -mattr=+altivec -mattr=+vsx | FileCheck %s -check-prefix=CHECK-VSX
-; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -march=ppc64 -mattr=+altivec -mattr=+vsx | FileCheck %s -check-prefix=CHECK-VSX
-; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -march=ppc64 -mattr=+altivec -mattr=+vsx | FileCheck %s -check-prefix=CHECK-LE-VSX
+; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -march=ppc64 -mattr=+altivec -mattr=-vsx -mcpu=pwr7 | FileCheck %s
+; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -march=ppc64 -mattr=+altivec -mattr=-vsx -mcpu=pwr8 | FileCheck %s -check-prefix=CHECK-LE
+; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -march=ppc64 -mattr=+altivec -mattr=+vsx -mcpu=pwr7 | FileCheck %s -check-prefix=CHECK-VSX
+; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -march=ppc64 -mattr=+altivec -mattr=+vsx -mcpu=pwr8 | FileCheck %s -check-prefix=CHECK-LE-VSX
 
 define <4 x i32> @test_v4i32(<4 x i32>* %X, <4 x i32>* %Y) {
        %tmp = load <4 x i32>* %X               ; <<4 x i32>> [#uses=1]
index b990442aed87545dbc59596188a41c4dc436205c..b55e12960fa653e26f5a95d11cd3431e5ad67768 100644 (file)
@@ -1,7 +1,6 @@
 ; RUN: llc -O0 -mtriple=powerpc-unknown-linux-gnu -mattr=+altivec -mattr=-vsx -verify-machineinstrs < %s | FileCheck %s
-; RUN: llc -O0 -mtriple=powerpc64-unknown-linux-gnu -mattr=+altivec -mattr=-vsx -verify-machineinstrs -fast-isel=false < %s | FileCheck %s
-; RUN: llc -O0 -mtriple=powerpc-unknown-linux-gnu -mattr=+altivec -mattr=+vsx -verify-machineinstrs < %s | FileCheck -check-prefix=CHECK-VSX %s
-; RUN: llc -O0 -mtriple=powerpc64-unknown-linux-gnu -mattr=+altivec -mattr=+vsx -verify-machineinstrs -fast-isel=false < %s | FileCheck -check-prefix=CHECK-VSX %s
+; RUN: llc -O0 -mtriple=powerpc64-unknown-linux-gnu -mattr=+altivec -mattr=-vsx -verify-machineinstrs -fast-isel=false -mcpu=pwr7 < %s | FileCheck %s
+; RUN: llc -O0 -mtriple=powerpc64-unknown-linux-gnu -mattr=+altivec -mattr=+vsx -verify-machineinstrs -fast-isel=false -mcpu=pwr7 < %s | FileCheck -check-prefix=CHECK-VSX %s
 
 ; This verifies that we generate correct spill/reload code for vector regs.