[llvm] r220173 - [PowerPC] Clean up -mattr=+vsx tests to always specify -mcpu

Bill Schmidt wschmidt at linux.vnet.ibm.com
Sun Oct 19 14:29:22 PDT 2014


Author: wschmidt
Date: Sun Oct 19 16:29:21 2014
New Revision: 220173

URL: http://llvm.org/viewvc/llvm-project?rev=220173&view=rev
Log:
[PowerPC] Clean up -mattr=+vsx tests to always specify -mcpu

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.

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

Modified: llvm/trunk/test/CodeGen/PowerPC/2007-09-08-unaligned.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2007-09-08-unaligned.ll?rev=220173&r1=220172&r2=220173&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/2007-09-08-unaligned.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/2007-09-08-unaligned.ll Sun Oct 19 16:29:21 2014
@@ -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"

Modified: llvm/trunk/test/CodeGen/PowerPC/2012-10-12-bitcast.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2012-10-12-bitcast.ll?rev=220173&r1=220172&r2=220173&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/2012-10-12-bitcast.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/2012-10-12-bitcast.ll Sun Oct 19 16:29:21 2014
@@ -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"
 

Modified: llvm/trunk/test/CodeGen/PowerPC/buildvec_canonicalize.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/buildvec_canonicalize.ll?rev=220173&r1=220172&r2=220173&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/buildvec_canonicalize.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/buildvec_canonicalize.ll Sun Oct 19 16:29:21 2014
@@ -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
 ; 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
 }
 ; CHECK: @VSPLTI
 ; CHECK: vsplti
-; CHECK-VSX: @VSPLTI
-; CHECK-VSX: vsplti

Modified: llvm/trunk/test/CodeGen/PowerPC/fabs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/fabs.ll?rev=220173&r1=220172&r2=220173&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/fabs.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/fabs.ll Sun Oct 19 16:29:21 2014
@@ -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:

Modified: llvm/trunk/test/CodeGen/PowerPC/fnabs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/fnabs.ll?rev=220173&r1=220172&r2=220173&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/fnabs.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/fnabs.ll Sun Oct 19 16:29:21 2014
@@ -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)
 

Modified: llvm/trunk/test/CodeGen/PowerPC/fp-branch.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/fp-branch.ll?rev=220173&r1=220172&r2=220173&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/fp-branch.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/fp-branch.ll Sun Oct 19 16:29:21 2014
@@ -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)
 

Modified: llvm/trunk/test/CodeGen/PowerPC/fp_to_uint.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/fp_to_uint.ll?rev=220173&r1=220172&r2=220173&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/fp_to_uint.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/fp_to_uint.ll Sun Oct 19 16:29:21 2014
@@ -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) {

Modified: llvm/trunk/test/CodeGen/PowerPC/i64_fp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/i64_fp.ll?rev=220173&r1=220172&r2=220173&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/i64_fp.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/i64_fp.ll Sun Oct 19 16:29:21 2014
@@ -17,10 +17,6 @@
 ; 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]

Modified: llvm/trunk/test/CodeGen/PowerPC/unsafe-math.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/unsafe-math.ll?rev=220173&r1=220172&r2=220173&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/unsafe-math.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/unsafe-math.ll Sun Oct 19 16:29:21 2014
@@ -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

Modified: llvm/trunk/test/CodeGen/PowerPC/vec_mul.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/vec_mul.ll?rev=220173&r1=220172&r2=220173&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/vec_mul.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/vec_mul.ll Sun Oct 19 16:29:21 2014
@@ -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]

Modified: llvm/trunk/test/CodeGen/PowerPC/vrspill.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/vrspill.ll?rev=220173&r1=220172&r2=220173&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/vrspill.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/vrspill.ll Sun Oct 19 16:29:21 2014
@@ -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.
 





More information about the llvm-commits mailing list