llvm.org GIT mirror llvm / 76c5897
Add mcpu to tests to prevent them from using AVX instructions on Sandy Bridge after r155618. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155696 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 7 years ago
32 changed file(s) with 49 addition(s) and 49 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llc < %s -march=x86 -mtriple=i386-linux-gnu -mattr=+sse2 -stats -realign-stack=0 |&\
0 ; RUN: llc < %s -march=x86 -mtriple=i386-linux-gnu -mcpu=penryn -mattr=+sse2 -stats -realign-stack=0 |&\
11 ; RUN: grep {asm-printer} | grep 35
22
33 target datalayout = "e-p:32:32"
None ; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse41 -stats |& grep {8 machine-licm}
1 ; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse41 | FileCheck %s
0 ; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse41 -mcpu=penryn -stats |& grep {8 machine-licm}
1 ; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse41 -mcpu=penryn | FileCheck %s
22 ; rdar://6627786
33 ; rdar://7792037
44
None ; RUN: llc -march=x86-64 -mattr=+sse41 < %s | FileCheck %s -check-prefix=CHECK-W-SSE4
1 ; RUN: llc -march=x86-64 -mattr=-sse41 < %s | FileCheck %s -check-prefix=CHECK-WO-SSE4
0 ; RUN: llc -march=x86-64 -mattr=+sse41 -mcpu=penryn < %s | FileCheck %s -check-prefix=CHECK-W-SSE4
1 ; RUN: llc -march=x86-64 -mattr=-sse41 -mcpu=penryn < %s | FileCheck %s -check-prefix=CHECK-WO-SSE4
22 ; Test case for r146671
33 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-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
44 target triple = "x86_64-apple-macosx10.7"
None ; RUN: llc < %s -mtriple=x86_64-linux -mattr=+sse2 | FileCheck %s
1 ; RUN: llc < %s -mtriple=x86_64-win32 -mattr=+sse2 | FileCheck %s
0 ; RUN: llc < %s -mtriple=x86_64-linux -mattr=+sse2 -mcpu=nehalem | FileCheck %s
1 ; RUN: llc < %s -mtriple=x86_64-win32 -mattr=+sse2 -mcpu=nehalem | FileCheck %s
22
33 define double @t1(float* nocapture %x) nounwind readonly ssp {
44 entry:
None ; RUN: llc -mtriple=x86_64-linux < %s | FileCheck %s
1 ; RUN: llc -mtriple=x86_64-win32 < %s | FileCheck %s
0 ; RUN: llc -mtriple=x86_64-linux -mcpu=nehalem < %s | FileCheck %s
1 ; RUN: llc -mtriple=x86_64-win32 -mcpu=nehalem < %s | FileCheck %s
22 ; rdar://7398554
33
44 ; When doing vector gather-scatter index calculation with 32-bit indices,
None ; RUN: llc < %s -march=x86 -mattr=+sse2 | grep {mulpd %xmm3, %xmm1}
1 ; RUN: llc < %s -march=x86 -mattr=+sse2 | grep {mulpd %xmm2, %xmm0}
2 ; RUN: llc < %s -march=x86 -mattr=+sse2 | grep {addps %xmm3, %xmm1}
3 ; RUN: llc < %s -march=x86 -mattr=+sse2 | grep {addps %xmm2, %xmm0}
0 ; RUN: llc < %s -march=x86 -mattr=+sse2 -mcpu=nehalem | grep {mulpd %xmm3, %xmm1}
1 ; RUN: llc < %s -march=x86 -mattr=+sse2 -mcpu=nehalem | grep {mulpd %xmm2, %xmm0}
2 ; RUN: llc < %s -march=x86 -mattr=+sse2 -mcpu=nehalem | grep {addps %xmm3, %xmm1}
3 ; RUN: llc < %s -march=x86 -mattr=+sse2 -mcpu=nehalem | grep {addps %xmm2, %xmm0}
44
55 define <4 x double> @foo(<4 x double> %x, <4 x double> %z) {
66 %y = fmul <4 x double> %x, %z
None ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
1 ; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
0 ; RUN: llc < %s -mtriple=x86_64-linux -mcpu=nehalem | FileCheck %s
1 ; RUN: llc < %s -mtriple=x86_64-win32 -mcpu=nehalem | FileCheck %s
22
33 ; Full strength reduction wouldn't reduce register pressure, so LSR should
44 ; stick with indexing here.
None ; RUN: llc -asm-verbose=false -disable-branch-fold -disable-code-place -disable-tail-duplicate -march=x86-64 < %s | FileCheck %s
0 ; RUN: llc -asm-verbose=false -disable-branch-fold -disable-code-place -disable-tail-duplicate -march=x86-64 -mcpu=nehalem < %s | FileCheck %s
11 ; rdar://7236213
22
33 ; Xfailed now that scheduler 2-address hack is disabled a lea is generated.
None ; RUN: llc < %s -march=x86 -mattr=sse41 -stack-alignment=16 -join-physregs > %t
0 ; RUN: llc < %s -march=x86 -mattr=sse41 -mcpu=nehalem -stack-alignment=16 -join-physregs > %t
11 ; RUN: grep pmul %t | count 12
22 ; RUN: grep mov %t | count 11
33
None ; RUN: llc < %s -march=x86-64 -asm-verbose=false -mtriple=x86_64-unknown-linux-gnu -post-RA-scheduler=true | FileCheck %s
0 ; RUN: llc < %s -march=x86-64 -asm-verbose=false -mtriple=x86_64-unknown-linux-gnu -mcpu=nehalem -post-RA-scheduler=true | FileCheck %s
11
22 ; Currently, floating-point selects are lowered to CFG triangles.
33 ; This means that one side of the select is always unconditionally
None ; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 | FileCheck %s
0 ; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -mcpu=nehalem | FileCheck %s
11 ; rdar://7434544
22
33 define <2 x i64> @t2() nounwind {
None ; RUN: llc < %s -march=x86-64 | FileCheck %s
0 ; RUN: llc < %s -march=x86-64 -mcpu=nehalem | FileCheck %s
11
22 ; CHECK: a:
33 ; CHECK: movdqu
None ; RUN: llc < %s | FileCheck %s
0 ; RUN: llc < %s -mcpu=nehalem | FileCheck %s
11 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-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
22 target triple = "x86_64-apple-macosx10.7"
33
None ; RUN: llc < %s -march=x86-64 -asm-verbose=false -join-physregs -promote-elements | FileCheck %s
1 ; RUN: llc < %s -march=x86-64 -asm-verbose=false -join-physregs -enable-unsafe-fp-math -enable-no-nans-fp-math -promote-elements | FileCheck -check-prefix=UNSAFE %s
2 ; RUN: llc < %s -march=x86-64 -asm-verbose=false -join-physregs -enable-no-nans-fp-math -promote-elements | FileCheck -check-prefix=FINITE %s
0 ; RUN: llc < %s -march=x86-64 -mcpu=nehalem -asm-verbose=false -join-physregs -promote-elements | FileCheck %s
1 ; RUN: llc < %s -march=x86-64 -mcpu=nehalem -asm-verbose=false -join-physregs -enable-unsafe-fp-math -enable-no-nans-fp-math -promote-elements | FileCheck -check-prefix=UNSAFE %s
2 ; RUN: llc < %s -march=x86-64 -mcpu=nehalem -asm-verbose=false -join-physregs -enable-no-nans-fp-math -promote-elements | FileCheck -check-prefix=FINITE %s
33
44 ; Some of these patterns can be matched as SSE min or max. Some of
55 ; then can be matched provided that the operands are swapped.
None ; RUN: llc < %s -mtriple=i686-apple-darwin9 -mattr=sse41 | FileCheck %s -check-prefix=X32
1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin9 -mattr=sse41 | FileCheck %s -check-prefix=X64
0 ; RUN: llc < %s -mtriple=i686-apple-darwin9 -mattr=sse41 -mcpu=penryn | FileCheck %s -check-prefix=X32
1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin9 -mattr=sse41 -mcpu=penryn | FileCheck %s -check-prefix=X64
22
33 @g16 = external global i16
44
None ; RUN: llc < %s -march=x86 -mattr=+sse2 -stats |& \
0 ; RUN: llc < %s -march=x86 -mattr=+sse2 -mcpu=penryn -stats |& \
11 ; RUN: grep {twoaddrinstr} | grep {Number of instructions aggressively commuted}
22 ; rdar://6480363
33
None ; RUN: llc < %s -march=x86 -mattr=+sse2 | grep pslldq
1 ; RUN: llc < %s -march=x86 -mattr=+sse2 -mtriple=i686-apple-darwin9 -o /dev/null -stats -info-output-file - | grep asm-printer | grep 6
0 ; RUN: llc < %s -march=x86 -mattr=+sse2 -mcpu=penryn | grep pslldq
1 ; RUN: llc < %s -march=x86 -mattr=+sse2 -mcpu=penryn -mtriple=i686-apple-darwin9 -o /dev/null -stats -info-output-file - | grep asm-printer | grep 6
22
33 define <4 x float> @t3(<4 x float>* %P) nounwind {
44 %tmp1 = load <4 x float>* %P
None ; RUN: llc < %s -march=x86 -mattr=+sse2 -o %t
0 ; RUN: llc < %s -march=x86 -mattr=+sse2 -mcpu=penryn -o %t
11 ; RUN: grep pshufd %t | count 2
22
33 define <4 x float> @test(float %a) nounwind {
None ; RUN: llc < %s -march=x86 -mattr=+sse,-sse2 -mtriple=i386-apple-darwin | FileCheck %s -check-prefix=sse
1 ; RUN: llc < %s -march=x86 -mattr=+sse2 -mtriple=i386-apple-darwin | FileCheck %s -check-prefix=sse2
0 ; RUN: llc < %s -march=x86 -mcpu=penryn -mattr=+sse,-sse2 -mtriple=i386-apple-darwin | FileCheck %s -check-prefix=sse
1 ; RUN: llc < %s -march=x86 -mcpu=penryn -mattr=+sse2 -mtriple=i386-apple-darwin | FileCheck %s -check-prefix=sse2
22
33 ; sse: t1:
44 ; sse2: t1:
None ; RUN: llc < %s -o /dev/null -march=x86 -mattr=+sse2 -mtriple=i686-apple-darwin9 -stats -info-output-file - | grep asm-printer | grep 4
0 ; RUN: llc < %s -o /dev/null -march=x86 -mcpu=penryn -mattr=+sse2 -mtriple=i686-apple-darwin9 -stats -info-output-file - | grep asm-printer | grep 4
11 ; PR2485
22
33 define <4 x i32> @t(<4 x i32> %a, <4 x i32> %b) nounwind {
None ; RUN: llc < %s -march=x86 -mattr=sse41 | FileCheck %s
0 ; RUN: llc < %s -march=x86 -mcpu=penryn -mattr=sse41 | FileCheck %s
11
22 ; ModuleID = 'vec_shuffle-27.bc'
33 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-f80:32:32"
3434 store <4 x i64> %vect1487, <4 x i64>* %ap
3535 store <4 x i64> %vect1488, <4 x i64>* %bp
3636 ret void;
37 }
37 }
None ; RUN: llc < %s -march=x86-64 -mattr=sse41 | FileCheck %s
0 ; RUN: llc < %s -march=x86-64 -mcpu=penryn -mattr=sse41 | FileCheck %s
11
22 define <8 x i16> @shuf6(<8 x i16> %T0, <8 x i16> %T1) nounwind readnone {
33 ; CHECK: pshufb
None ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
1 ; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
0 ; RUN: llc < %s -mtriple=x86_64-linux -mcpu=core2 | FileCheck %s
1 ; RUN: llc < %s -mtriple=x86_64-win32 -mcpu=core2 | FileCheck %s
22 ; RUN: llc -O0 < %s -march=x86 -mcpu=core2 | FileCheck %s --check-prefix=CHECK_O0
33
44 define <4 x i32> @t00(<4 x i32>* %a0) nounwind ssp {
None ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
0 ; RUN: llc < %s -mtriple=x86_64-linux -mcpu=penryn | FileCheck %s
11 ; rdar://10050222, rdar://10134392
22
33 define <4 x float> @t1(<4 x float> %a, <1 x i64>* nocapture %p) nounwind {
None ; RUN: llc < %s -march=x86 -mattr=+sse2 | grep pshufd | count 1
0 ; RUN: llc < %s -march=x86 -mcpu=penryn -mattr=+sse2 | grep pshufd | count 1
11
22 define void @test(<2 x i64>* %P, i8 %x) nounwind {
33 %tmp = insertelement <16 x i8> zeroinitializer, i8 %x, i32 0 ; <<16 x i8>> [#uses=1]
None ; RUN: llc < %s -march=x86 -mattr=sse41 -o %t
0 ; RUN: llc < %s -march=x86 -mcpu=penryn -mattr=sse41 -o %t
11 ; RUN: grep punpcklwd %t | count 4
22 ; RUN: grep punpckhwd %t | count 4
33 ; RUN: grep "pshufd" %t | count 8
None ; RUN: llc < %s -march=x86 -mattr=sse41 -o %t
0 ; RUN: llc < %s -march=x86 -mcpu=penryn -mattr=sse41 -o %t
11 ; RUN: grep punpcklbw %t | count 16
22 ; RUN: grep punpckhbw %t | count 16
33 ; RUN: grep "pshufd" %t | count 16
None ; RUN: llc < %s -march=x86 -mattr=+sse2 | grep pshufd
1 ; RUN: llc < %s -march=x86 -mattr=+sse3 | grep movddup
0 ; RUN: llc < %s -march=x86 -mcpu=penryn -mattr=+sse2 | grep pshufd
1 ; RUN: llc < %s -march=x86 -mcpu=penryn -mattr=+sse3 | grep movddup
22
33 define void @test_v4sf(<4 x float>* %P, <4 x float>* %Q, float %X) nounwind {
44 %tmp = insertelement <4 x float> zeroinitializer, float %X, i32 0 ; <<4 x float>> [#uses=1]
None ; RUN: llc < %s -march=x86 -mattr=+sse42 | FileCheck %s
0 ; RUN: llc < %s -march=x86 -mcpu=nehalem -mattr=+sse42 | FileCheck %s
11 ; CHECK: pextrd
22 ; CHECK: pextrd
33 ; CHECK: movd
None ; RUN: llc < %s -march=x86 -mattr=+sse42 | FileCheck %s
0 ; RUN: llc < %s -march=x86 -mcpu=nehalem -mattr=+sse42 | FileCheck %s
11 ; CHECK-NOT: cvtsi2ss
22
33 ; unsigned to float v7i16 to v7f32
None ; RUN: llc < %s -march=x86-64 -mattr=+sse42 | FileCheck %s
0 ; RUN: llc < %s -march=x86-64 -mcpu=nehalem -mattr=+sse42 | FileCheck %s
11 ; widen extract subvector
22
33 define void @convert(<2 x double>* %dst.addr, <3 x double> %src) {
None ; RUN: llc < %s | not grep rsp
1 ; RUN: llc < %s | grep cvttsd2siq
0 ; RUN: llc < %s -mcpu=nehalem | not grep rsp
1 ; RUN: llc < %s -mcpu=nehalem | grep cvttsd2siq
22
33 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-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
44 target triple = "x86_64-apple-darwin8"