llvm.org GIT mirror llvm / b0a0439
PowerPC: Do not use llc -march in tests. `llc -march` is problematic because it only switches the target architecture, but leaves the operating system unchanged. This occasionally leads to indeterministic tests because the OS from LLVM_DEFAULT_TARGET_TRIPLE is used. However we can simply always use `llc -mtriple` instead. This changes all the tests to do this to avoid people using -march when they copy and paste parts of tests. This patch: - Removes -march if the .ll file already has a matching `target triple` directive or -mtriple argument. - In all other cases changes -march=ppc32/-march=ppc64 to -mtriple=ppc32--/-mtriple=ppc64-- See also the discussion in https://reviews.llvm.org/D35287 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309754 91177308-0d34-0410-b5e6-96231b3b80d8 Matthias Braun 2 years ago
234 changed file(s) with 391 addition(s) and 397 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11 define void @test() {
22 %tr1 = lshr i32 1, 0 ; [#uses=0]
33 ret void
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22 define void @main() {
33 %tr4 = shl i64 1, 0 ; [#uses=0]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22 define void @main() {
33 %shamt = add i8 0, 1 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep .comm.*X,0
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep .comm.*X,0
11
22 @X = linkonce global { } zeroinitializer ; <{ }*> [#uses=0]
33
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22 define i32 @main() {
33 %setle = icmp sle i64 1, 0 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22 define i64 @test() {
33 ret i64 undef
0 ; this should not crash the ppc backend
11
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
33
44
55 define i32 @test(i32 %j.0.0.i) {
0 ; This function should have exactly one call to fixdfdi, no more!
11
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mattr=-64bit | \
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mattr=-64bit | \
33 ; RUN: grep "bl .*fixdfdi" | count 1
44
55 define double @test2(double %tmp.7705) {
0 ; This was erroneously being turned into an rlwinm instruction.
11 ; The sign bit does matter in this case.
22
3 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep srawi
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep srawi
44
55 define i32 @test(i32 %X) {
66 %Y = and i32 %X, -2 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22
33 define double @CalcSpeed(float %tmp127) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
11 ; RUN: grep "vspltish v.*, 10"
22
33 define void @test(<8 x i16>* %P) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5
11 ; END.
22
33 define void @test(i8* %stack) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11 ; END.
22
33 %struct.attr_desc = type { i8*, %struct.attr_desc*, %struct.attr_value*, %struct.attr_value*, i32 }
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22 define void @img2buf(i32 %symbol_size_in_bytes, i16* %ui16) nounwind {
33 %tmp93 = load i16, i16* null ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | grep vsldoi
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | not grep vor
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | grep vsldoi
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | not grep vor
22
33 define <4 x float> @func(<4 x float> %fp0, <4 x float> %fp1) {
44 %tmp76 = shufflevector <4 x float> %fp0, <4 x float> %fp1, <4 x i32> < i32 0, i32 1, i32 2, i32 7 > ; <<4 x float>> [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64
0 ; RUN: llc -verify-machineinstrs < %s
11
22 target datalayout = "E-p:64:64"
33 target triple = "powerpc64-apple-darwin8"
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep IMPLICIT_DEF
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep IMPLICIT_DEF
11
22 define void @foo(i64 %X) {
33 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep xor
0 ; RUN: llc -verify-machineinstrs < %s | grep xor
11
22 target datalayout = "E-p:32:32"
33 target triple = "powerpc-apple-darwin8.7.0"
None ; RUN: llc < %s -march=ppc64
0 ; RUN: llc < %s -mtriple=ppc64--
11
22 define i32* @foo(i32 %n) {
33 %A = alloca i32, i32 %n ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep rlwimi
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep rlwimi
11
22 define void @test(i16 %div.0.i.i.i.i, i32 %L_num.0.i.i.i.i, i32 %tmp1.i.i206.i.i, i16* %P) {
33 %X = shl i16 %div.0.i.i.i.i, 1 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5
11
22 define void @glgRunProcessor15() {
33 %tmp26355.i = shufflevector <4 x float> zeroinitializer, <4 x float> < float 0x379FFFE000000000, float 0x379FFFE000000000, float 0x379FFFE000000000, float 0x379FFFE000000000 >, <4 x i32> < i32 0, i32 1, i32 2, i32 7 >; <<4 x float>> [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32
2 ; RUN: llc -verify-machineinstrs < %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64--
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
2 ; RUN: llc -verify-machineinstrs < %s
33 ; REQUIRES: default_triple
44
55 define void @bitap() {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64--
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
22 ; RUN: llc -verify-machineinstrs < %s
33 ; REQUIRES: default_triple
44
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep extsb
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep extsh
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep extsb
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep extsh
22
33 define i32 @p1(i8 %c, i16 %s) {
44 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | \
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | \
11 ; RUN: grep cntlz
22
33 define i32 @foo() nounwind {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc64
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64--
22
33 define i16 @test(i8* %d1, i16* %d2) {
44 %tmp237 = call i16 asm "lhbrx $0, $2, $1", "=r,r,bO,m"( i8* %d1, i32 0, i16* %d2 ) ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc64
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64--
22
33 ; Test two things: 1) that a frameidx can be rewritten in an inline asm
44 ; 2) that inline asms can handle reg+imm addr modes.
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin8.8.0 | \
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8.8.0 | \
11 ; RUN: grep align.*3
22
33 @X = global <{i32, i32}> <{ i32 1, i32 123 }>
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5
11
22 define void @test(<4 x float>*, { { i16, i16, i32 } }*) {
33 xOperationInitMasks.exit:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin8.8.0 -no-integrated-as | grep "foo r3, r4"
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin8.8.0 -no-integrated-as | grep "bari r3, 47"
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8.8.0 -no-integrated-as | grep "foo r3, r4"
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8.8.0 -no-integrated-as | grep "bari r3, 47"
22
33 ; PR1351
44
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s
11 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"
22 target triple = "powerpc-apple-darwin8.8.0"
33 %struct..0anon = type { i32 }
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -enable-tail-merge=0 | grep bl.*baz | count 2
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -enable-tail-merge=0 | grep bl.*quux | count 2
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep bl.*baz | count 1
3 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep bl.*quux | count 1
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -enable-tail-merge=0 | grep bl.*baz | count 2
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -enable-tail-merge=0 | grep bl.*quux | count 2
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep bl.*baz | count 1
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep bl.*quux | count 1
44 ; Check that tail merging is the default on ppc, and that -enable-tail-merge works.
55
66 ; ModuleID = 'tail.c'
0 ; RUN: llc -verify-machineinstrs < %s | grep "rlwinm r3, r3, 23, 30, 30"
1 ; PR1473
2 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"
13 target triple = "powerpc-apple-darwin8.8.0"
2
3 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep "rlwinm r3, r3, 23, 30, 30"
4 ; PR1473
54
65 define zeroext i8 @foo(i16 zeroext %a) {
76 %tmp2 = lshr i16 %a, 10 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mattr=+altivec
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mattr=+altivec
11
22 %struct.XATest = type { float, i16, i8, i8 }
33 %struct.XArrayRange = type { i8, i8, i8, i8 }
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64--
11 ; PR1596
22
33 %struct._obstack_chunk = type { i8* }
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mattr=+altivec | grep dst | count 4
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mattr=+altivec | grep dst | count 4
11
22 define hidden void @_Z4borkPc(i8* %image) {
33 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -O1 | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | FileCheck --check-prefix=CHECK-OPT %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -O1 | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- | FileCheck --check-prefix=CHECK-OPT %s
22
33 %struct.__db_region = type { %struct.__mutex_t, [4 x i8], %struct.anon, i32, [1 x i32] }
44 %struct.__mutex_t = type { i32 }
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64--
11
22 %struct.TCMalloc_SpinLock = type { i32 }
33
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11 ; rdar://5538377
22
33 %struct.disk_unsigned = type { i32 }
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mattr=+altivec
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mattr=+altivec
11 %struct.inoutprops = type <{ i8, [3 x i8] }>
22
33 define void @bork(float* %argA, float* %argB, float* %res, i8 %inoutspec.0) {
None ; RUN: llc -verify-machineinstrs < %s
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g3
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5
0 ; RUN: llc -verify-machineinstrs < %s
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g3
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5
33 ; PR1811
44 ; REQUIRES: default_triple
55
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22 %struct._cpp_strbuf = type { i8*, i32, i32 }
33 %struct.cpp_string = type { i32, i8* }
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64--
11
22 define i16 @test(i8* %d1, i16* %d2) {
33 %tmp237 = call i16 asm "lhbrx $0, $2, $1", "=r,r,bO,m"( i8* %d1, i32 0, i16* %d2 )
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64--
11
22 define fastcc i8* @page_rec_get_next(i8* %rec) nounwind {
33 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22 %struct..0objc_object = type { %struct.objc_class* }
33 %struct.NSArray = type { %struct..0objc_object }
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s
11 target triple = "powerpc-apple-darwin9.2.2"
22
33 define i256 @func(ppc_fp128 %a, ppc_fp128 %b, ppc_fp128 %c, ppc_fp128 %d) nounwind readnone {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22 define void @t() nounwind {
33 call void null( ppc_fp128 undef )
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22 @g = external global ppc_fp128
33 @h = external global ppc_fp128
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11 ;
22
33 define i32 @bork() nounwind {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | grep vadduhm
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | grep vsubuhm
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | grep vadduhm
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | grep vsubuhm
22
33 define <4 x i32> @test() nounwind {
44 ret <4 x i32> < i32 4293066722, i32 4293066722, i32 4293066722, i32 4293066722>
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64--
11
22 define void @__divtc3({ ppc_fp128, ppc_fp128 }* noalias sret %agg.result, ppc_fp128 %a, ppc_fp128 %b, ppc_fp128 %c, ppc_fp128 %d) nounwind {
33 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -o - | not grep fixunstfsi
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -o - | not grep fixunstfsi
11
22 define i64 @__fixunstfdi(ppc_fp128 %a) nounwind readnone {
33 entry:
None ; RUN: llc < %s -march=ppc32 -verify-machineinstrs
0 ; RUN: llc < %s -mtriple=ppc32-- -verify-machineinstrs
11
22 ; Machine code verifier will call isRegTiedToDefOperand() on /all/ register use
33 ; operands. We must make sure that the operand flag is found correctly.
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin10 -mcpu=g5 -disable-ppc-ilp-pref | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=g5 -disable-ppc-ilp-pref | FileCheck %s
11 ; ModuleID = ''
22 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"
33 target triple = "powerpc-apple-darwin10.0"
None ; RUN: llc -verify-machineinstrs -march=ppc32 < %s | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
11 ; ModuleID = ''
22 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"
33 target triple = "powerpc-apple-darwin9.6"
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 -mtriple=powerpc-apple-darwin10.0 | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=g5 -mtriple=powerpc-apple-darwin10.0 | FileCheck %s
11 ; ModuleID = 'nn.c'
22 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"
33 target triple = "powerpc-apple-darwin11.0"
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mcpu=g5 | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mcpu=g5 -regalloc=basic | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -mcpu=g5 | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -mcpu=g5 -regalloc=basic | FileCheck %s
22
33 declare i8* @llvm.frameaddress(i32) nounwind readnone
44
None ; RUN: llc < %s -march=ppc64 -verify-machineinstrs
0 ; RUN: llc < %s -verify-machineinstrs
11 ;
22 ; This test is disabled until PPCISelLowering learns to insert proper 64-bit
33 ; code for ATOMIC_CMP_SWAP. Currently, it is inserting 32-bit instructions with
None RUN: llc -O0 -march=ppc32 -asm-verbose < %S/../Inputs/DbgValueOtherTargets.ll | FileCheck %S/../Inputs/DbgValueOtherTargets.ll
0 RUN: llc -O0 -mtriple=ppc32-- -asm-verbose < %S/../Inputs/DbgValueOtherTargets.ll | FileCheck %S/../Inputs/DbgValueOtherTargets.ll
None ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32
1 ; RUN: llc < %s -march=ppc64 -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC64
2 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC32-NOFP
3 ; RUN: llc < %s -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC64-NOFP
4 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32
5 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32-RS
6 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC32-RS-NOFP
0 ; RUN: llc < %s -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32
1 ; RUN: llc < %s -mtriple=powerpc64-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC64
2 ; RUN: llc < %s -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC32-NOFP
3 ; RUN: llc < %s -mtriple=powerpc64-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC64-NOFP
4 ; RUN: llc < %s -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32
5 ; RUN: llc < %s -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32-RS
6 ; RUN: llc < %s -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC32-RS-NOFP
77
88 ; CHECK-PPC32: stw r31, -4(r1)
99 ; CHECK-PPC32: lwz r1, 0(r1)
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | FileCheck %s -check-prefix=PPC32-NOFP
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -disable-fp-elim | FileCheck %s -check-prefix=PPC32-FP
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=PPC32-NOFP
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=PPC32-FP
22
3 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | FileCheck %s -check-prefix=PPC64-NOFP
4 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -disable-fp-elim | FileCheck %s -check-prefix=PPC64-FP
5
6
7 target triple = "powerpc-apple-darwin8"
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin8 | FileCheck %s -check-prefix=PPC64-NOFP
4 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=PPC64-FP
85
96 define i32* @f1() nounwind {
107 %tmp = alloca i32, i32 8191 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
11 ; RUN: not grep "stw r31, 20(r1)"
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
33 ; RUN: not grep "stwu r1, -.*(r1)"
4 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
4 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
55 ; RUN: not grep "addi r1, r1, "
6 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
6 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
77 ; RUN: not grep "lwz r31, 20(r1)"
8 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -disable-fp-elim | \
8 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -disable-fp-elim | \
99 ; RUN: not grep "stw r31, 20(r1)"
10 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -disable-fp-elim | \
10 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -disable-fp-elim | \
1111 ; RUN: not grep "stwu r1, -.*(r1)"
12 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -disable-fp-elim | \
12 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -disable-fp-elim | \
1313 ; RUN: not grep "addi r1, r1, "
14 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -disable-fp-elim | \
14 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -disable-fp-elim | \
1515 ; RUN: not grep "lwz r31, 20(r1)"
16 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | \
16 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- | \
1717 ; RUN: not grep "std r31, 40(r1)"
18 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | \
18 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- | \
1919 ; RUN: not grep "stdu r1, -.*(r1)"
20 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | \
20 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- | \
2121 ; RUN: not grep "addi r1, r1, "
22 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | \
22 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- | \
2323 ; RUN: not grep "ld r31, 40(r1)"
24 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -disable-fp-elim | \
24 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -disable-fp-elim | \
2525 ; RUN: not grep "stw r31, 40(r1)"
26 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -disable-fp-elim | \
26 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -disable-fp-elim | \
2727 ; RUN: not grep "stdu r1, -.*(r1)"
28 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -disable-fp-elim | \
28 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -disable-fp-elim | \
2929 ; RUN: not grep "addi r1, r1, "
30 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -disable-fp-elim | \
30 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -disable-fp-elim | \
3131 ; RUN: not grep "ld r31, 40(r1)"
3232
3333 define i32* @f1() {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -o %t1
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 -o %t1
11 ; RUN: not grep "stw r31, -4(r1)" %t1
22 ; RUN: grep "stwu r1, -16416(r1)" %t1
33 ; RUN: grep "addi r1, r1, 16416" %t1
4 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
4 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
55 ; RUN: not grep "lwz r31, -4(r1)"
6 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim \
6 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 -disable-fp-elim \
77 ; RUN: -o %t2
88 ; RUN: grep "stw r31, -4(r1)" %t2
99 ; RUN: grep "stwu r1, -16416(r1)" %t2
1010 ; RUN: grep "addi r1, r1, 16416" %t2
1111 ; RUN: grep "lwz r31, -4(r1)" %t2
12 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mtriple=powerpc-apple-darwin8 -o %t3
12 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin8 -o %t3
1313 ; RUN: not grep "std r31, -8(r1)" %t3
1414 ; RUN: grep "stdu r1, -16432(r1)" %t3
1515 ; RUN: grep "addi r1, r1, 16432" %t3
1616 ; RUN: not grep "ld r31, -8(r1)" %t3
17 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim \
17 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin8 -disable-fp-elim \
1818 ; RUN: -o %t4
1919 ; RUN: grep "std r31, -8(r1)" %t4
2020 ; RUN: grep "stdu r1, -16448(r1)" %t4
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin | \
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin | \
11 ; RUN: grep "stw r3, 32751"
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mtriple=powerpc-apple-darwin | \
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-apple-darwin | \
33 ; RUN: grep "stw r3, 32751"
4 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mtriple=powerpc-apple-darwin | \
4 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-apple-darwin | \
55 ; RUN: grep "std r3, 9024"
66
77 define void @test() nounwind {
None ; RUN: llc -verify-machineinstrs -march=ppc32 -mtriple=powerpc-unknown-linux-gnu -mattr=+altivec < %s | FileCheck %s
0 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu -mattr=+altivec < %s | FileCheck %s
11
22 ;; This test ensures that MergeConsecutiveStores does not attempt to
33 ;; merge stores or loads when doing so would result in unaligned
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2 -fp-contract=fast | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=a2 -fp-contract=fast | FileCheck %s
11
22 %0 = type { double, double }
33
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2 | FileCheck -check-prefix=CHECK-A2 %s
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2q | FileCheck -check-prefix=CHECK-A2Q %s
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mtriple=powerpc64-bgq-linux -mcpu=a2 | FileCheck -check-prefix=CHECK-BGQ %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=a2 | FileCheck -check-prefix=CHECK-A2 %s
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=a2q | FileCheck -check-prefix=CHECK-A2Q %s
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-bgq-linux -mcpu=a2 | FileCheck -check-prefix=CHECK-BGQ %s
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-f128:128:128-v128:128:128-n32:64"
44 target triple = "powerpc64-unknown-linux-gnu"
55
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2q | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2 -mattr=+qpx | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=a2q | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=a2 -mattr=+qpx | FileCheck %s
22
33 define void @foo() {
44 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep addi
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep addi
11
22 %struct.X = type { [5 x i8] }
33
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep mfcr
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep mfcr
11
22 define void @foo(i32 %X, i32 %Y, i32 %Z) {
33 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep rlwin
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep rlwin
11
22 define void @test(i8* %P) {
33 %W = load i8, i8* %P
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep "ori\|lis"
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep "ori\|lis"
11
22 ; andi. r3, r3, 32769
33 define i32 @test(i32 %X) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -o %t
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -o %t
11 ; RUN: grep slwi %t
22 ; RUN: not grep addi %t
33 ; RUN: not grep rlwinm %t
0 ; These tests should not contain a sign extend.
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep extsh
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep extsb
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep extsh
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep extsb
33
44 define i32 @test1(i32 %mode.0.i.0) {
55 %tmp.79 = trunc i32 %mode.0.i.0 to i16
0 ; Neither of these functions should contain algebraic right shifts
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep srawi
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep srawi
22
33 define i32 @test1(i32 %mode.0.i.0) {
44 %tmp.79 = bitcast i32 %mode.0.i.0 to i32 ; [#uses=1]
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=a2 | FileCheck %s
1 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-f128:128:128-v128:128:128-n32:64"
12 target triple = "powerpc64-bgq-linux"
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2 | FileCheck %s
33
44 define i32 @zytest(i32 %a) nounwind {
55 entry:
None ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -march=ppc32 | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin | FileCheck %s
11
22 define i32 @exchange_and_add(i32* %mem, i32 %val) nounwind {
33 ; CHECK-LABEL: exchange_and_add:
None ; RUN: llc < %s -ppc-asm-full-reg-names -march=ppc64 | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-BE
1 ; RUN: llc < %s -ppc-asm-full-reg-names -march=ppc64le -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-LE
2 ; RUN: llc < %s -ppc-asm-full-reg-names -march=ppc64 -mcpu=pwr7 | FileCheck %s
3 ; RUN: llc < %s -ppc-asm-full-reg-names -march=ppc64 -mcpu=pwr8 | FileCheck %s -check-prefix=CHECK-P8U
0 ; RUN: llc < %s -ppc-asm-full-reg-names -mtriple=ppc64-- | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-BE
1 ; RUN: llc < %s -ppc-asm-full-reg-names -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-LE
2 ; RUN: llc < %s -ppc-asm-full-reg-names -mtriple=ppc64-- -mcpu=pwr7 | FileCheck %s
3 ; RUN: llc < %s -ppc-asm-full-reg-names -mtriple=ppc64-- -mcpu=pwr8 | FileCheck %s -check-prefix=CHECK-P8U
44
55 define i64 @exchange_and_add(i64* %mem, i64 %val) nounwind {
66 ; CHECK-LABEL: exchange_and_add:
None ; RUN: llc < %s -mtriple=powerpc-apple-darwin -march=ppc32 -verify-machineinstrs | FileCheck %s
1 ; RUN: llc < %s -mtriple=powerpc-apple-darwin -march=ppc64 -verify-machineinstrs | FileCheck %s
0 ; RUN: llc < %s -mtriple=powerpc-apple-darwin -verify-machineinstrs | FileCheck %s
1 ; RUN: llc < %s -mtriple=powerpc64-apple-darwin -verify-machineinstrs | FileCheck %s
22 ; RUN: llc < %s -mtriple=powerpc-apple-darwin -mcpu=440 | FileCheck %s --check-prefix=PPC440
33
44 ; Fences
None ; RUN: llc < %s -mtriple=powerpc-apple-darwin -march=ppc32 -verify-machineinstrs | FileCheck %s --check-prefix=CHECK --check-prefix=PPC32
0 ; RUN: llc < %s -mtriple=powerpc-apple-darwin -verify-machineinstrs | FileCheck %s --check-prefix=CHECK --check-prefix=PPC32
11 ; FIXME: -verify-machineinstrs currently fail on ppc64 (mismatched register/instruction).
22 ; This is already checked for in Atomics-64.ll
3 ; RUN: llc < %s -mtriple=powerpc-apple-darwin -march=ppc64 | FileCheck %s --check-prefix=CHECK --check-prefix=PPC64
3 ; RUN: llc < %s -mtriple=powerpc64-apple-darwin | FileCheck %s --check-prefix=CHECK --check-prefix=PPC64
44
55 ; In this file, we check that atomic load/store can make use of the indexed
66 ; versions of the instructions.
None ; RUN: llc < %s -mtriple=powerpc-apple-darwin -march=ppc32 -verify-machineinstrs | FileCheck %s --check-prefix=CHECK --check-prefix=PPC32
0 ; RUN: llc < %s -mtriple=powerpc-apple-darwin -verify-machineinstrs | FileCheck %s --check-prefix=CHECK --check-prefix=PPC32
11 ; FIXME: -verify-machineinstrs currently fail on ppc64 (mismatched register/instruction).
22 ; This is already checked for in Atomics-64.ll
3 ; RUN: llc < %s -mtriple=powerpc-apple-darwin -march=ppc64 | FileCheck %s --check-prefix=CHECK --check-prefix=PPC64
3 ; RUN: llc < %s -mtriple=powerpc64-apple-darwin | FileCheck %s --check-prefix=CHECK --check-prefix=PPC64
44
55 ; FIXME: we don't currently check for the operations themselves with CHECK-NEXT,
66 ; because they are implemented in a very messy way with lwarx/stwcx.
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-unknown-linux-gnu | \
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | \
11 ; RUN: grep "addc 4, 4, 6"
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-unknown-linux-gnu | \
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | \
33 ; RUN: grep "adde 3, 3, 5"
44
55 define i64 @foo(i64 %x, i64 %y) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-unknown-linux-gnu | \
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | \
11 ; RUN: grep "addic 4, 4, 1"
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-unknown-linux-gnu | \
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | \
33 ; RUN: grep "addze 3, 3"
44
55 declare i64 @foo()
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
11
22 declare void @bar(i64 %x, i64 %y)
33
None ; RUN: llc -verify-machineinstrs < %s -code-model=small -march=ppc64 -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=SMALL
1 ; RUN: llc -verify-machineinstrs < %s -code-model=medium -march=ppc64 -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=MEDIUM
2 ; RUN: llc -verify-machineinstrs < %s -code-model=large -march=ppc64 -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=MEDIUM
3 ; RUN: llc -verify-machineinstrs < %s -code-model=small -march=ppc64 -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s -check-prefix=SMALL
4 ; RUN: llc -verify-machineinstrs < %s -code-model=medium -march=ppc64 -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s -check-prefix=MEDIUM
5 ; RUN: llc -verify-machineinstrs < %s -code-model=large -march=ppc64 -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s -check-prefix=MEDIUM
0 ; RUN: llc -verify-machineinstrs < %s -code-model=small -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=SMALL
1 ; RUN: llc -verify-machineinstrs < %s -code-model=medium -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=MEDIUM
2 ; RUN: llc -verify-machineinstrs < %s -code-model=large -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=MEDIUM
3 ; RUN: llc -verify-machineinstrs < %s -code-model=small -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s -check-prefix=SMALL
4 ; RUN: llc -verify-machineinstrs < %s -code-model=medium -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s -check-prefix=MEDIUM
5 ; RUN: llc -verify-machineinstrs < %s -code-model=large -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s -check-prefix=MEDIUM
66
77 define i8* @test() {
88 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
11
22 target datalayout = "E-p:32:32"
33 target triple = "powerpc-apple-darwin8.7.0"
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=ppc32 | FileCheck %s -check-prefix=X32
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=ppc64 | FileCheck %s -check-prefix=X64
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=pwr7 | FileCheck %s -check-prefix=PWR7
3 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=pwr7 | FileCheck %s -check-prefix=X32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=ppc32 | FileCheck %s -check-prefix=X32
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=ppc64 | FileCheck %s -check-prefix=X64
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=pwr7 | FileCheck %s -check-prefix=PWR7
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=pwr7 | FileCheck %s -check-prefix=X32
44
55
66 define void @STWBRX(i32 %i, i8* %ptr, i32 %off) {
None ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mattr=+altivec --enable-unsafe-fp-math | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- -mattr=+altivec --enable-unsafe-fp-math | FileCheck %s
11
22 define void @VXOR(<4 x float>* %P1, <4 x i32>* %P2, <4 x float>* %P3) {
33 %tmp = load <4 x float>, <4 x float>* %P3 ; <<4 x float>> [#uses=1]
0 ; Test various forms of calls.
11
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
33 ; RUN: grep "bl " | count 1
4 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
4 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
55 ; RUN: grep "bctrl" | count 1
6 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
6 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
77 ; RUN: grep "bla " | count 1
88
99 declare void @foo()
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep mfcr
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep mfcr
11
22 define void @test(i64 %X) {
33 %tmp1 = and i64 %X, 3 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -mtriple powerpc-apple-darwin8 -march=ppc32 | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple powerpc-apple-darwin8 | FileCheck %s
11
22 ; Check that *coal* sections are emitted.
33
None ; RUN: llc -verify-machineinstrs -march=ppc64 -mcpu=g5 -mtriple=powerpc64-apple-darwin < %s | FileCheck %s
0 ; RUN: llc -verify-machineinstrs -mcpu=g5 -mtriple=powerpc64-apple-darwin < %s | FileCheck %s
11 ; Check that the peephole optimizer knows about sext and zext instructions.
22 ; CHECK: test1sext
33 define i32 @test1sext(i64 %A, i64 %B, i32* %P, i64 *%P2) nounwind {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | FileCheck %s
11
22 define i32 @test(i32 %x) nounwind {
33 ; CHECK-LABEL: @test
0 ; All of these routines should be perform optimal load of constants.
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
22 ; RUN: grep lis | count 5
3 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
44 ; RUN: grep ori | count 3
5 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
5 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
66 ; RUN: grep "li " | count 4
77
88 define i32 @f1() {
None ; RUN: llc < %s -march=ppc32 -regalloc=fast -O0 -relocation-model=pic -o -
0 ; RUN: llc < %s -mtriple=ppc32-- -regalloc=fast -O0 -relocation-model=pic -o -
11 ; PR1638
22
33 @.str242 = external constant [3 x i8] ; <[3 x i8]*> [#uses=1]
0 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
1 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"
12 target triple = "powerpc64-unknown-freebsd10.0"
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | FileCheck %s
33
44 define void @test1(i32 %c) nounwind {
55 entry:
0 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
1 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"
12 target triple = "powerpc64-unknown-linux-gnu"
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | FileCheck %s
33
44 ; XFAIL: *
55 ; SE needs improvement
0 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
1 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"
12 target triple = "powerpc64-unknown-linux-gnu"
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | FileCheck %s
33
44 ; XFAIL: *
55 ; SE needs improvement
0 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
1 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"
12 target triple = "powerpc64-unknown-linux-gnu"
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | FileCheck %s
33
44 ; CHECK: test_pos1_ir_ne
55 ; CHECK: bdnz
0 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
1 ; ModuleID = 'bugpoint-reduced-simplified.bc'
12 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"
23 target triple = "powerpc64-unknown-linux-gnu"
3 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | FileCheck %s
44
55 %struct.ref_s.1.49.91.115.121.139.145.151.157.163.169.175.181.211 = type { %union.v.0.48.90.114.120.138.144.150.156.162.168.174.180.210, i16, i16 }
66 %union.v.0.48.90.114.120.138.144.150.156.162.168.174.180.210 = type { i64 }
0 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
1 ; ModuleID = 'tsc_s000.c'
12 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"
23 target triple = "powerpc64-unknown-linux-gnu"
3 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | FileCheck %s
44
55 @Y = common global [16000 x double] zeroinitializer, align 32
66 @X = common global [16000 x double] zeroinitializer, align 32
0 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
1 ; ModuleID = 'SingleSource/Regression/C/sumarray2d.c'
12 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"
23 target triple = "powerpc64-unknown-linux-gnu"
3 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | FileCheck %s
44
55 @.str = private unnamed_addr constant [23 x i8] c"Sum(Array[%d,%d] = %d\0A\00", align 1
66
None ; RUN: llc < %s -march=ppc64 | FileCheck %s
0 ; RUN: llc < %s | FileCheck %s
11 target datalayout = "E-m:e-i64:64-n32:64"
22 target triple = "powerpc64-unknown-linux-gnu"
33
0 ; RUN: llc -verify-machineinstrs < %s -relocation-model=pic | FileCheck %s
1 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"
12 target triple = "powerpc64-unknown-freebsd10.0"
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -relocation-model=pic | FileCheck %s
33
44 @a = common global i32 0, align 4
55
0 ; Make sure this testcase does not use ctpop
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | FileCheck %s
22
33 declare i32 @llvm.cttz.i32(i32, i1)
44
None ; RUN: llc -verify-machineinstrs < %s -break-anti-dependencies=all -march=ppc64 -mcpu=g5 | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -break-anti-dependencies=all -mcpu=g5 | FileCheck %s
11 ; CHECK-LABEL: main:
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-v128:128:128-n32:64"
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22 ; The DAGCombiner leaves behind a dead node in this testcase. Currently
33 ; ISel is ignoring dead nodes, though it would be preferable for
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep srawi
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep blr
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep srawi
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep blr
22
33 define i32 @test1(i32 %X) {
44 %Y = and i32 %X, 15 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
11 ; RUN: grep eqv | count 3
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | \
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | \
33 ; RUN: grep andc | count 3
4 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
4 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
55 ; RUN: grep orc | count 2
6 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | \
6 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | \
77 ; RUN: grep nor | count 3
8 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
8 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
99 ; RUN: grep nand | count 1
1010
1111 define i32 @EQV1(i32 %X, i32 %Y) nounwind {
0 ; This should turn into a single extsh
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep extsh | count 1
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep extsh | count 1
22 define i32 @test(i32 %X) {
33 %tmp.81 = shl i32 %X, 16 ; [#uses=1]
44 %tmp.82 = ashr i32 %tmp.81, 16 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mtriple=powerpc-apple-darwin | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-apple-darwin | FileCheck %s
11
22 define double @fabs(double %f) {
33 ; CHECK-LABEL: fabs:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -fp-contract=fast -mattr=-vsx -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK -check-prefix=CHECK-SAFE %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -fp-contract=fast -mattr=-vsx -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK -check-prefix=CHECK-SAFE %s
11 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -fp-contract=fast -mattr=+vsx -mcpu=pwr7 -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK-VSX -check-prefix=CHECK-VSX-SAFE %s
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -fp-contract=fast -enable-unsafe-fp-math -mattr=-vsx -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK -check-prefix=CHECK-UNSAFE %s
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -fp-contract=fast -enable-unsafe-fp-math -mattr=-vsx -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK -check-prefix=CHECK-UNSAFE %s
33 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -fp-contract=fast -enable-unsafe-fp-math -mattr=+vsx -mcpu=pwr7 -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK-VSX -check-prefix=CHECK-UNSAFE-VSX %s
44
55 define double @test_FMADD_ASSOC1(double %A, double %B, double %C,
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -fp-contract=fast -mattr=-vsx -disable-ppc-vsx-fma-mutation=false | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -fp-contract=fast -mattr=-vsx -disable-ppc-vsx-fma-mutation=false | FileCheck %s
11 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -fp-contract=fast -mattr=+vsx -mcpu=pwr7 -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK-VSX %s
22
33 define double @test_FMADD_EXT1(float %A, float %B, double %C) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -fp-contract=fast -mattr=-vsx -disable-ppc-vsx-fma-mutation=false | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -fp-contract=fast -mattr=-vsx -disable-ppc-vsx-fma-mutation=false | FileCheck %s
11 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -fp-contract=fast -mattr=+vsx -mcpu=pwr7 -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK-VSX %s
22 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -fp-contract=fast -mcpu=pwr8 -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK-P8 %s
33 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -fp-contract=fast -mcpu=pwr8 -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK-P8 %s
None ; RUN: llc -verify-machineinstrs -march=ppc32 -mtriple=powerpc-unknown-linux-gnu < %s | FileCheck %s
0 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu < %s | FileCheck %s
11
22 declare float @fmaxf(float, float)
33 declare double @fmax(double, double)
None ; RUN: llc -verify-machineinstrs -march=ppc32 -mtriple=powerpc-unknown-linux-gnu < %s | FileCheck %s
0 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu < %s | FileCheck %s
11
22 declare float @fminf(float, float)
33 declare double @fmin(double, double)
None ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 | grep fnabs
0 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- | grep fnabs
11
22 declare double @fabs(double)
33
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep fneg
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep fneg
11
22 define double @test1(double %a, double %b, double %c, double %d) {
33 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
11 ; RUN: grep -v align | not grep li
22
33 ;; Test that immediates are folded into these instructions correctly.
None ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 | grep fcmp | count 1
0 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- | grep fcmp | count 1
11
22 declare i1 @llvm.isunordered.f64(double, double)
33
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | not grep r1
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | not grep r1
11
22 define double @test1(double %X) {
33 %Y = fptosi double %X to i64 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 | grep fctiwz | count 1
0 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- | grep fctiwz | count 1
11
22
33 define i16 @foo(float %a) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep fmr
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep fmr
11
22 define double @test(float %F) {
33 %F.upgrd.1 = fpext float %F to double ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22 define i32 @foo() {
33 entry:
0 ; fsqrt should be generated when the fsqrt feature is enabled, but not
11 ; otherwise.
22
3 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=+fsqrt | \
3 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-apple-darwin8 -mattr=+fsqrt | \
44 ; RUN: grep "fsqrt f1, f1"
5 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
5 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
66 ; RUN: grep "fsqrt f1, f1"
7 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-fsqrt | \
7 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-apple-darwin8 -mattr=-fsqrt | \
88 ; RUN: not grep "fsqrt f1, f1"
9 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g4 | \
9 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-apple-darwin8 -mcpu=g4 | \
1010 ; RUN: not grep "fsqrt f1, f1"
1111
1212 declare double @llvm.sqrt.f64(double)
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc64
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64--
22 ; PR1399
33
44 @.str = internal constant [13 x i8] c"Hello World!\00"
None ; RUN: llc -verify-machineinstrs -march=ppc32 -mcpu=ppc32 -mtriple=powerpc-unknown-linux-gnu < %s | FileCheck %s
0 ; RUN: llc -verify-machineinstrs -mcpu=ppc32 -mtriple=powerpc-unknown-linux-gnu < %s | FileCheck %s
11 define double @test(i1 %X) {
22 %Y = uitofp i1 %X to double
33 ret double %Y
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep 4294967295 | count 28
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep 4294967295 | count 28
11
22 ; These static initializers are too big to hand off to assemblers
33 ; as monolithic blobs.
0 ; fcfid and fctid should be generated when the 64bit feature is enabled, but not
11 ; otherwise.
22
3 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mattr=+64bit | \
3 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- -mattr=+64bit | \
44 ; RUN: grep fcfid
5 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mattr=+64bit | \
5 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- -mattr=+64bit | \
66 ; RUN: grep fctidz
7 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mcpu=g5 | \
7 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- -mcpu=g5 | \
88 ; RUN: grep fcfid
9 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mcpu=g5 | \
9 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- -mcpu=g5 | \
1010 ; RUN: grep fctidz
11 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mattr=-64bit | \
11 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- -mattr=-64bit | \
1212 ; RUN: not grep fcfid
13 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mattr=-64bit | \
13 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- -mattr=-64bit | \
1414 ; RUN: not grep fctidz
15 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mcpu=g4 | \
15 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- -mcpu=g4 | \
1616 ; RUN: not grep fcfid
17 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -mcpu=g4 | \
17 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- -mcpu=g4 | \
1818 ; RUN: not grep fctidz
1919
2020 define double @X(double %Y) {
0 ; REQUIRES: asserts
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -stats 2>&1 | \
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -stats 2>&1 | \
22 ; RUN: grep "4 .*Number of machine instrs printed"
33
44 ;; Integer absolute value, should produce something as good as:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g3
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g3
11
22 define void @foo() {
33 entry:
None ; RUN: llc < %s -relocation-model=pic -march=ppc32 -mtriple=powerpc-apple-darwin | FileCheck %s -check-prefix=PIC
1 ; RUN: llc < %s -relocation-model=static -march=ppc32 -mtriple=powerpc-apple-darwin | FileCheck %s -check-prefix=STATIC
2 ; RUN: llc < %s -relocation-model=pic -march=ppc64 -mtriple=powerpc64-apple-darwin | FileCheck %s -check-prefix=PPC64
0 ; RUN: llc < %s -relocation-model=pic -mtriple=powerpc-apple-darwin | FileCheck %s -check-prefix=PIC
1 ; RUN: llc < %s -relocation-model=static -mtriple=powerpc-apple-darwin | FileCheck %s -check-prefix=STATIC
2 ; RUN: llc < %s -relocation-model=pic -mtriple=powerpc64-apple-darwin | FileCheck %s -check-prefix=PPC64
33
44 @nextaddr = global i8* null ; [#uses=2]
55 @C.0.2070 = private constant [5 x i8*] [i8* blockaddress(@foo, %L1), i8* blockaddress(@foo, %L2), i8* blockaddress(@foo, %L3), i8* blockaddress(@foo, %L4), i8* blockaddress(@foo, %L5)] ; <[5 x i8*]*> [#uses=1]
None ; RUN: llc < %s -march=ppc32 -no-integrated-as -verify-machineinstrs | FileCheck %s
0 ; RUN: llc < %s -mtriple=ppc32-- -no-integrated-as -verify-machineinstrs | FileCheck %s
11
22 ; CHECK-NOT: mr
33 define i32 @test(i32 %Y, i32 %X) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 > %t
0 ; RUN: llc -verify-machineinstrs < %s > %t
11 ; RUN: grep __floattitf %t
22 ; RUN: grep __fixunstfti %t
33
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- | FileCheck %s
11 ; CHECK-NOT: __floatditf
22
33 define i64 @__fixunstfdi(ppc_fp128 %a) nounwind {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep xori
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep xori
11
22 define i32 @test(i1 %B, i32* %P) {
33 br i1 %B, label %T, label %F
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | \
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | \
11 ; RUN: grep "srwi r3, r3, 31"
22
33 define i32 @test1(i32 %X) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64
0 ; RUN: llc -verify-machineinstrs < %s
11
22 target datalayout = "E-p:64:64:64-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"
33 target triple = "powerpc64-apple-darwin9.2.0"
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep lha
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep lha
11
22 define i32 @test(i16* %a) {
33 %tmp.1 = load i16, i16* %a ; [#uses=1]
0 ; Should fold the ori into the lfs.
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep lfs
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep ori
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep lfs
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep ori
33
44 define float @test() {
55 %tmp.i = load float, float* inttoptr (i32 186018016 to float*) ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep cntlzw
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep xori
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep "li "
3 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep "mr "
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep cntlzw
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep xori
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep "li "
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep "mr "
44
55 define i1 @test(i64 %x) {
66 %tmp = icmp ult i64 %x, 4294967296
33 ; so we only test that -filetype=obj tries to parse the assembly.
44 ; FIXME: PowerPC doesn't appear to support -filetype=obj for ppc64le
55
6 ; SKIP: not llc -march=ppc32 < %s > /dev/null 2> %t1
6 ; SKIP: not llc -mtriple=ppc32-- < %s > /dev/null 2> %t1
77 ; SKIP: FileCheck %s < %t1
88
9 ; RUN: not llc -march=ppc32 -filetype=obj < %s > /dev/null 2> %t2
9 ; RUN: not llc -mtriple=ppc32-- -filetype=obj < %s > /dev/null 2> %t2
1010 ; RUN: FileCheck %s < %t2
1111
1212 ; Test that we don't try to produce COFF for ppc.
1313 ; RUN: not llc -mtriple=powerpc-mingw32 -filetype=obj < %s > /dev/null 2> %t2
1414 ; RUN: FileCheck %s < %t2
1515
16 ; SKIP: not llc -march=ppc64 < %s > /dev/null 2> %t3
16 ; SKIP: not llc -mtriple=ppc64-- < %s > /dev/null 2> %t3
1717 ; SKIP: FileCheck %s < %t3
1818
19 ; RUN: not llc -march=ppc64 -filetype=obj < %s > /dev/null 2> %t4
19 ; RUN: not llc -mtriple=ppc64-- -filetype=obj < %s > /dev/null 2> %t4
2020 ; RUN: FileCheck %s < %t4
2121
22 ; SKIP: not llc -march=ppc64le < %s > /dev/null 2> %t5
22 ; SKIP: not llc -mtriple=ppc64--le < %s > /dev/null 2> %t5
2323 ; SKIP: FileCheck %s < %t5
2424
25 ; SKIP: not llc -march=ppc64le -filetype=obj < %s > /dev/null 2> %t6
25 ; SKIP: not llc -mtriple=ppc64--le -filetype=obj < %s > /dev/null 2> %t6
2626 ; SKIP: FileCheck %s < %t6
2727
2828 module asm " .this_directive_is_very_unlikely_to_exist"
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | grep li.*16
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | not grep addi
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | grep li.*16
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | not grep addi
22
33 ; Codegen lvx (R+16) as t = li 16, lvx t,R
44 ; This shares the 16 between the two loads.
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | \
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
11 ; RUN: not grep addi
2 ; RUN: llc -verify-machineinstrs -code-model=small < %s -march=ppc64 | \
2 ; RUN: llc -verify-machineinstrs -code-model=small < %s -mtriple=ppc64-- | \
33 ; RUN: not grep addi
44
55 @Glob = global i64 4
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep mul
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep mul
11
22 define i32 @test1(i32 %a) {
33 %tmp.1 = mul i32 %a, -2 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22 declare {i32, i1} @llvm.umul.with.overflow.i32(i32 %a, i32 %b)
33 define zeroext i1 @a(i32 %x) nounwind {
0 ; All of these ands and shifts should be folded into rlwimi's
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -o %t
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -o %t
22 ; RUN: not grep mulhwu %t
33 ; RUN: not grep srawi %t
44 ; RUN: not grep add %t
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -no-integrated-as
0 ; RUN: llc -verify-machineinstrs < %s -no-integrated-as
11 ; ModuleID = 'mult-alt-generic.c'
22 target datalayout = "E-p:32:32:32-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"
3 target triple = "powerpc"
3 target triple = "powerpc--"
44
55 @mout0 = common global i32 0, align 4
66 @min1 = common global i32 0, align 4
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -no-integrated-as
0 ; RUN: llc -verify-machineinstrs < %s -no-integrated-as
11 ; ModuleID = 'mult-alt-generic.c'
22 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"
3 target triple = "powerpc64"
3 target triple = "powerpc64--"
44
55 @mout0 = common global i32 0, align 4
66 @min1 = common global i32 0, align 4
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep neg
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep neg
11
22 define i32 @test(i32 %X) {
33 %Y = sub i32 0, %X ; [#uses=1]
None ; RUN: llc -verify-machineinstrs -march=ppc64 -mattr=+popcntd < %s | FileCheck %s
1 ; RUN: llc -verify-machineinstrs -march=ppc64 -mattr=+slow-popcntd < %s | FileCheck %s --check-prefix=SLOWPC
2 ; RUN: llc -verify-machineinstrs -march=ppc64 -mcpu=pwr7 < %s | FileCheck %s
3 ; RUN: llc -verify-machineinstrs -march=ppc64 -mcpu=a2q < %s | FileCheck %s --check-prefix=SLOWPC
4 ; RUN: llc -verify-machineinstrs -march=ppc64 -mcpu=a2q -mattr=+popcntd < %s | FileCheck %s
0 ; RUN: llc -verify-machineinstrs -mtriple=ppc64-- -mattr=+popcntd < %s | FileCheck %s
1 ; RUN: llc -verify-machineinstrs -mtriple=ppc64-- -mattr=+slow-popcntd < %s | FileCheck %s --check-prefix=SLOWPC
2 ; RUN: llc -verify-machineinstrs -mtriple=ppc64-- -mcpu=pwr7 < %s | FileCheck %s
3 ; RUN: llc -verify-machineinstrs -mtriple=ppc64-- -mcpu=a2q < %s | FileCheck %s --check-prefix=SLOWPC
4 ; RUN: llc -verify-machineinstrs -mtriple=ppc64-- -mcpu=a2q -mattr=+popcntd < %s | FileCheck %s
55
66 define i8 @cnt8(i8 %x) nounwind readnone {
77 %cnt = tail call i8 @llvm.ctpop.i8(i8 %x)
0 ; RUN: llc < %s | FileCheck %s
1 target datalayout = "E-p:32:32:32-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"
12 target triple = "powerpc-montavista-linux-gnuspe"
2 ; RUN: llc < %s -march=ppc32 | FileCheck %s
33
44 %struct.__va_list_tag.0.9.18.23.32.41.48.55.62.67.72.77.82.87.90.93.96.101.105 = type { i8, i8, i16, i8*, i8* }
55
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=ppc32 | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=ppc32 -mtriple=powerpc-darwin9 | FileCheck %s -check-prefix=CHECK-D
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=ppc32 | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -mcpu=ppc32 -mtriple=powerpc-darwin9 | FileCheck %s -check-prefix=CHECK-D
22 target triple = "powerpc-unknown-linux-gnu"
33
44 declare void @printf(i8*, ...)
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=440 -fp-contract=fast | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=440 -fp-contract=fast | FileCheck %s
11
22 %0 = type { double, double }
33
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2 | FileCheck %s
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=440 | FileCheck %s -check-prefix=BE-CHK
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=a2 | FileCheck %s
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=440 | FileCheck %s -check-prefix=BE-CHK
33
44 define i32 @has_a_fence(i32 %a, i32 %b) nounwind {
55 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mattr=+altivec | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mattr=+altivec | FileCheck %s
11
22 target datalayout = "E-m:e-i64:64-n32:64"
33 target triple = "powerpc64-unknown-linux-gnu"
None ; RUN: llc -verify-machineinstrs -O1 < %s -march=ppc64 -mcpu=pwr7 | FileCheck %s
0 ; RUN: llc -verify-machineinstrs -O1 < %s -mcpu=pwr7 | FileCheck %s
11
22 target datalayout = "E-m:e-i64:64-n32:64"
33 target triple = "powerpc64-unknown-linux-gnu"
None ; RUN: llc -relocation-model=static -verify-machineinstrs < %s -march=ppc64 -mcpu=pwr7 | FileCheck %s
0 ; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mcpu=pwr7 | 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-v128:128:128-n32:64"
22 target triple = "powerpc64-unknown-linux-gnu"
33
33 ; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 -enable-ppc-prefetching=true -ppc-loop-prefetch-cache-line=64 | FileCheck %s -check-prefix=CHECK-DCBT
44 ; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 -enable-ppc-prefetching=true | FileCheck %s
55 ; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 -enable-ppc-prefetching=true -ppc-loop-prefetch-cache-line=64 | FileCheck %s -check-prefix=CHECK-DCBT
6 ; RUN: llc < %s -march=ppc64 -mcpu=a2 -enable-ppc-prefetching=true | FileCheck %s -check-prefix=CHECK-DCBT
6 ; RUN: llc < %s -mtriple=ppc64-- -mcpu=a2 -enable-ppc-prefetching=true | FileCheck %s -check-prefix=CHECK-DCBT
77
88 ; Function Attrs: nounwind
99 define signext i32 @check_cache_line() local_unnamed_addr {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64le -mcpu=pwr8 \
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=pwr8 \
11 ; RUN: -mattr=+altivec -mattr=-vsx | FileCheck %s
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc64le -mattr=+altivec \
2 ; RUN: llc -verify-machineinstrs < %s -mattr=+altivec \
33 ; RUN: -mattr=-vsx | FileCheck %s
4 ; RUN: llc -verify-machineinstrs < %s -march=ppc64le -mcpu=pwr9 \
4 ; RUN: llc -verify-machineinstrs < %s -mcpu=pwr9 \
55 ; RUN: -mattr=-direct-move -mattr=+altivec | FileCheck %s
66
77 ; Currently VSX support is disabled for this test because we generate lxsdx
None ; RUN: llc -verify-machineinstrs -march=ppc64le -mcpu=pwr8 < %s | FileCheck %s
1 ; RUN: llc -verify-machineinstrs -march=ppc64le < %s | FileCheck %s
0 ; RUN: llc -verify-machineinstrs -mcpu=pwr8 < %s | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
22
33 ; The second run of the test case is to ensure the behaviour is the same
44 ; without specifying -mcpu=pwr8 as that is now the baseline for ppc64le.
None ; RUN: llc -verify-machineinstrs -march=ppc64le -code-model=large < %s | FileCheck %s
0 ; RUN: llc -verify-machineinstrs -code-model=large < %s | FileCheck %s
11
22 target datalayout = "e-m:e-i64:64-n32:64"
33 target triple = "powerpc64le-unknown-linux-gnu"
None ; RUN: llc -verify-machineinstrs -march=ppc64le -mcpu=pwr8 < %s | FileCheck %s
1 ; RUN: llc -verify-machineinstrs -march=ppc64le -mcpu=pwr8 -O0 < %s | FileCheck %s
2 ; RUN: llc -verify-machineinstrs -march=ppc64le < %s | FileCheck %s
3 ; RUN: llc -verify-machineinstrs -march=ppc64le -O0 < %s | FileCheck %s
0 ; RUN: llc -verify-machineinstrs -mcpu=pwr8 < %s | FileCheck %s
1 ; RUN: llc -verify-machineinstrs -mcpu=pwr8 -O0 < %s | FileCheck %s
2 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
3 ; RUN: llc -verify-machineinstrs -O0 < %s | FileCheck %s
44
55 ; The second run of the test case is to ensure the behaviour is the same
66 ; without specifying -mcpu=pwr8 as that is now the baseline for ppc64le.
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64--
11
22 define i64 @__fixtfdi(ppc_fp128 %a) nounwind {
33 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11 %struct.stp_sequence = type { double, double }
22
33 define i32 @stp_sequence_set_short_data(%struct.stp_sequence* %sequence, i32 %count, i16* %data) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11
22 define ppc_fp128 @__floatditf(i64 %u) nounwind {
33 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mtriple=powerpc64-unknown-linux-gnu
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc64le -mtriple=powerpc64le-unknown-linux-gnu
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu
22
33 %"class.std::__1::locale::id.1580.4307.4610.8491" = type { %"struct.std::__1::once_flag.1579.4306.4609.8490", i32 }
44 %"struct.std::__1::once_flag.1579.4306.4609.8490" = type { i64 }
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mtriple=powerpc64-unknown-linux-gnu
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc64le -mtriple=powerpc64le-unknown-linux-gnu
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu
22
33 %class.Point.1 = type { %class.Tensor.0 }
44 %class.Tensor.0 = type { [3 x double] }
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5
11
22 ; Test that causes a abort in expanding a bit convert due to a missing support
33 ; for widening.
0 ; Test basic support for some older processors.
11
2 ;RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=pwr3 | FileCheck %s
3 ;RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=pwr4 | FileCheck %s
4 ;RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=pwr5 | FileCheck %s
5 ;RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=pwr5x | FileCheck %s
6 ;RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=pwr6x | FileCheck %s
2 ;RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=pwr3 | FileCheck %s
3 ;RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=pwr4 | FileCheck %s
4 ;RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=pwr5 | FileCheck %s
5 ;RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=pwr5x | FileCheck %s
6 ;RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=pwr6x | FileCheck %s
77
88 define void @foo() {
99 entry:
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=a2q | FileCheck %s
1 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-f128:128:128-v128:128:128-n32:64"
12 target triple = "powerpc64-bgq-linux"
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2q | FileCheck %s
33
44 define void @s452(i32 %inp1) nounwind {
55 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2q | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=a2q | FileCheck %s
11 target triple = "powerpc64-bgq-linux"
22
33 declare <4 x double> @foo(<4 x double> %p)
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2q | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=a2q | FileCheck %s
11 target triple = "powerpc64-bgq-linux"
22
33 define <4 x double> @foo(<4 x double>* %p) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2q | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=a2q | FileCheck %s
11 target triple = "powerpc64-bgq-linux"
22
33 define <4 x float> @foo(<4 x float>* %p) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2q | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=a2q | FileCheck %s
11 target triple = "powerpc64-bgq-linux"
22
33 @R = global <4 x i1> , align 16
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2q | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=a2q | FileCheck %s
11 target triple = "powerpc64-bgq-linux"
22
33 define void @foo(<4 x float> %v, <4 x float>* %p) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2q | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=a2q | FileCheck %s
11 target triple = "powerpc64-bgq-linux"
22
33 @R = global <4 x i1> , align 16
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=a2q | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=a2q | FileCheck %s
11 target triple = "powerpc64-bgq-linux"
22
33 define void @foo(<4 x double> %v, <4 x double>* %p) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep or
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep or
11
22 %struct.foo = type { i32, i32, [0 x i8] }
33
None ; RUN: llc -march=ppc32 -relocation-model=pic < %s | FileCheck %s
0 ; RUN: llc -relocation-model=pic < %s | FileCheck %s
11
22 ; The load restoring r30 at the end of the function was placed out of order
33 ; relative to its uses as the PIC base pointer.
1010 ; CHECK-NOT: 30,
1111
1212 target datalayout = "E-m:e-p:32:32-i64:64-n32"
13 target triple = "powerpc"
13 target triple = "powerpc--"
1414
1515 define double @fred(i64 %a) #0 {
1616 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep mflr
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep lwz
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | grep "ld r., 16(r1)"
3
4 target triple = "powerpc-apple-darwin8"
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | grep mflr
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | grep lwz
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin8 | grep "ld r., 16(r1)"
53
64 define void @foo(i8** %X) nounwind {
75 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64--
11
22 define i128 @__fixsfdi(float %a) {
33 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep rlwimi
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep "or "
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep rlwimi
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep "or "
22
33 ; Make sure there is no register-register copies here.
44
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin | FileCheck %s
11 ; Formerly dropped the RHS of %tmp6 when constructing rlwimi.
22 ; 7346117
33
0 ; All of these ands and shifts should be folded into rlwimi's
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep and
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep rlwimi | count 8
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep and
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep rlwimi | count 8
33
44 define i32 @test1(i32 %x, i32 %y) {
55 entry:
0 ; All of these ands and shifts should be folded into rlwimi's
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -o %t
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -o %t
22 ; RUN: grep rlwimi %t | count 4
33 ; RUN: not grep srwi %t
44 ; RUN: not grep slwi %t
0 ; REQUIRES: asserts
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -stats 2>&1 | \
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -stats 2>&1 | \
22 ; RUN: grep "Number of machine instrs printed" | grep 12
33
44 define i16 @Trans16Bit(i32 %srcA, i32 %srcB, i32 %alpha) {
0 ; All of these ands and shifts should be folded into rlwimi's
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -o %t
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -o %t
22 ; RUN: not grep and %t
33 ; RUN: not grep srawi %t
44 ; RUN: not grep srwi %t
0 ; All of these ands and shifts should be folded into rlw[i]nm instructions
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -o %t
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -o %t
22 ; RUN: not grep and %t
33 ; RUN: not grep srawi %t
44 ; RUN: not grep srwi %t
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep rotlwi | count 2
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep clrlwi | count 2
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep rotlw | count 4
3 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep or
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep rotlwi | count 2
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep clrlwi | count 2
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep rotlw | count 4
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep or
44
55 define i32 @rotl32(i32 %A, i8 %Amt) nounwind {
66 %shift.upgrd.1 = zext i8 %Amt to i32 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | grep rotld
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc64 | grep rotldi
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- | grep rotld
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- | grep rotldi
22 ; PR1613
33
44 define i64 @t1(i64 %A) {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep rotrw: | count 1
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep rotlw: | count 1
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep rotlwi: | count 1
3 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep rotrwi: | count 1
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep rotrw: | count 1
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep rotlw: | count 1
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep rotlwi: | count 1
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep rotrwi: | count 1
44
55 define i32 @rotlw(i32 %x, i32 %sh) {
66 entry:
0 ; RUN: llc -verify-machineinstrs < %s -enable-misched -mcpu=a2 | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -enable-misched -enable-aa-sched-mi -mcpu=a2 | FileCheck %s
2 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-f128:128:128-v128:128:128-n32:64"
13 target triple = "powerpc64-bgq-linux"
2 ; RUN: llc -verify-machineinstrs < %s -enable-misched -march=ppc64 -mcpu=a2 | FileCheck %s
3 ; RUN: llc -verify-machineinstrs < %s -enable-misched -enable-aa-sched-mi -march=ppc64 -mcpu=a2 | FileCheck %s
44
55 @aa = external global [256 x [256 x double]], align 32
66 @bb = external global [256 x [256 x double]], align 32
None ; RUN: llc -march=ppc64 -ppc-always-use-base-pointer < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC64
1 ; RUN: llc -march=ppc32 -ppc-always-use-base-pointer < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC32
2 ; RUN: llc -march=ppc32 -ppc-always-use-base-pointer -relocation-model pic < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC32PIC
0 ; RUN: llc -mtriple=ppc64-- -ppc-always-use-base-pointer < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC64
1 ; RUN: llc -ppc-always-use-base-pointer < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC32
2 ; RUN: llc -ppc-always-use-base-pointer -relocation-model pic < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC32PIC
33
44 ; CHECK-LABEL: fred:
55
None ; RUN: llc -march=ppc32 -relocation-model pic < %s | FileCheck %s
0 ; RUN: llc -relocation-model pic < %s | FileCheck %s
11 ;
22 ; Make sure that the CR register is saved correctly on PPC32/SVR4.
33
None ; RUN: llc -march=ppc32 -relocation-model pic < %s | FileCheck %s
0 ; RUN: llc -relocation-model pic < %s | FileCheck %s
11
22 ; CHECK-LABEL: fred
33 ; CHECK: stwux 1, 1, 0
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32--
11 ; PR3011
22
33 define <2 x double> @vector_select(<2 x double> %x, <2 x double> %y) nounwind {
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep cmp
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep cmp
11
22 define i32 @seli32_1(i32 %a) {
33 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep rlwinm
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep rlwinm
11
22 ; FIXME: This optimization has temporarily regressed with crbits enabled by
33 ; default at the default CodeOpt level.
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | FileCheck %s
11
22 define i32 @eq0(i32 %a) {
33 %tmp.1 = icmp eq i32 %a, 0 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep slwi
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep slwi
11
22 define i32 @test1(i64 %a) {
33 %tmp29 = lshr i64 %a, 24 ; [#uses=1]
0 ; This test should not contain a sign extend
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep extsb
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep extsb
22
33 define i32 @test(i32 %mode.0.i.0) {
44 %tmp.79 = trunc i32 %mode.0.i.0 to i8 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep srwi
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep rlwimi
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep srwi
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep rlwimi
22
33 define i32 @baz(i64 %a) {
44 %tmp29 = lshr i64 %a, 24 ; [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep "extsh\|rlwinm"
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep "extsh\|rlwinm"
11
22 declare signext i16 @foo()
33
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=stfiwx | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx | FileCheck -check-prefix=CHECK-LS %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 -mattr=stfiwx | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx | FileCheck -check-prefix=CHECK-LS %s
22
33 define void @test1(float %a, i32* %b) nounwind {
44 ; CHECK-LABEL: @test1
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | not grep lwz
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep lwz
11
22 define i32 @test(i32* %P) {
33 store i32 1, i32* %P
0 ; All of these should be codegen'd without loading immediates
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -o %t
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -o %t
22 ; RUN: grep subfc %t | count 1
33 ; RUN: grep subfe %t | count 1
44 ; RUN: grep subfze %t | count 1
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -tailcallopt | grep TC_RETURN
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -tailcallopt | grep TC_RETURN
11 define fastcc i32 @tailcallee(i32 %a1, i32 %a2, i32 %a3, i32 %a4) {
22 entry:
33 ret i32 %a3
None ; RUN: llc -verify-machineinstrs -march=ppc64 -mcpu=pwr7 -O2 -relocation-model=pic < %s | FileCheck %s
1 ; RUN: llc -verify-machineinstrs -march=ppc64 -mcpu=pwr7 -O2 -relocation-model=pic < %s | grep "__tls_get_addr" | count 1
0 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O2 -relocation-model=pic < %s | FileCheck %s
1 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O2 -relocation-model=pic < %s | grep "__tls_get_addr" | count 1
22
33 ; This test was derived from LLVM's own
44 ; PrettyStackTraceEntry::~PrettyStackTraceEntry(). It demonstrates an
None ; RUN: llc -verify-machineinstrs -march=ppc64 -mcpu=pwr7 -O0 -relocation-model=pic < %s | FileCheck -check-prefix=OPT0 %s
1 ; RUN: llc -verify-machineinstrs -march=ppc64 -mcpu=pwr7 -O1 -relocation-model=pic < %s | FileCheck -check-prefix=OPT1 %s
2 ; RUN: llc -verify-machineinstrs -march=ppc32 -O0 -relocation-model=pic < %s | FileCheck -check-prefix=OPT0-32 %s
3 ; RUN: llc -verify-machineinstrs -march=ppc32 -O1 -relocation-model=pic < %s | FileCheck -check-prefix=OPT1-32 %s
0 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O0 -relocation-model=pic < %s | FileCheck -check-prefix=OPT0 %s
1 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O1 -relocation-model=pic < %s | FileCheck -check-prefix=OPT1 %s
2 ; RUN: llc -verify-machineinstrs -mtriple=ppc32-- -O0 -relocation-model=pic < %s | FileCheck -check-prefix=OPT0-32 %s
3 ; RUN: llc -verify-machineinstrs -mtriple=ppc32-- -O1 -relocation-model=pic < %s | FileCheck -check-prefix=OPT1-32 %s
44
55 target triple = "powerpc64-unknown-linux-gnu"
66 ; Test correct assembly code generation for thread-local storage using
None ; RUN: llc -verify-machineinstrs -march=ppc64 -mcpu=pwr7 -O2 -relocation-model=pic < %s | FileCheck %s
0 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O2 -relocation-model=pic < %s | FileCheck %s
11
22 target datalayout = "e-m:e-i64:64-n32:64"
33 target triple = "powerpc64le-unknown-linux-gnu"
None ; RUN: llc -relocation-model=static -verify-machineinstrs -O0 < %s -march=ppc64 -mcpu=ppc64 | FileCheck -check-prefix=OPT0 %s
1 ; RUN: llc -relocation-model=static -verify-machineinstrs -O1 < %s -march=ppc64 -mcpu=ppc64 | FileCheck -check-prefix=OPT1 %s
2 ; RUN: llc -verify-machineinstrs -O0 < %s -march=ppc32 -mcpu=ppc | FileCheck -check-prefix=OPT0-PPC32 %s
0 ; RUN: llc -relocation-model=static -verify-machineinstrs -O0 < %s -mcpu=ppc64 | FileCheck -check-prefix=OPT0 %s
1 ; RUN: llc -relocation-model=static -verify-machineinstrs -O1 < %s -mcpu=ppc64 | FileCheck -check-prefix=OPT1 %s
2 ; RUN: llc -verify-machineinstrs -O0 < %s -mtriple=ppc32-- -mcpu=ppc | FileCheck -check-prefix=OPT0-PPC32 %s
33
44 target triple = "powerpc64-unknown-linux-gnu"
55
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep "__trampoline_setup"
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | grep "__trampoline_setup"
11
22 module asm "\09.lazy_reference .objc_class_name_NSImageRep"
33 module asm "\09.objc_class_name_NSBitmapImageRep=0"
None ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 | grep fmul | count 2
1 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -march=ppc32 -enable-unsafe-fp-math | \
0 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- | grep fmul | count 2
1 ; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=ppc32-- -enable-unsafe-fp-math | \
22 ; RUN: grep fmul | count 1
33
44 define double @foo(double %X) nounwind {
0 ; This should fold the "vcmpbfp." and "vcmpbfp" instructions into a single
11 ; "vcmpbfp.".
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | grep vcmpbfp | count 1
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | grep vcmpbfp | count 1
33
44
55 define void @test(<4 x float>* %x, <4 x float>* %y, i32* %P) {
None ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -march=ppc64le \
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu \
11 ; RUN: -mattr=+altivec -mattr=+vsx | FileCheck %s
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -march=ppc64le \
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu \
33 ; RUN: -mattr=+altivec -mattr=-vsx | FileCheck %s \
44 ; RUN: -check-prefix=CHECK-NOVSX
55
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mcpu=g5 | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -mcpu=g5 | FileCheck %s
11 ; Formerly produced .long, 7320806 (partial)
22 ; CHECK: .byte 22
33 ; CHECK: .byte 21
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 -o %t
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 -o %t
11 ; RUN: grep vcmpeqfp. %t
22 ; RUN: not grep mfcr %t
33
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mattr=+altivec -disable-ppc-ilp-pref | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -mattr=+altivec -disable-ppc-ilp-pref | FileCheck %s
11 ; Formerly this did byte loads and word stores.
22 @a = external global <16 x i8>
33 @b = external global <16 x i8>
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5
11
22 define <4 x i32> @test_arg(<4 x i32> %A, <4 x i32> %B) {
33 %C = add <4 x i32> %A, %B ; <<4 x i32>> [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | FileCheck %s -check-prefix=CHECK-NOVSX
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -march=ppc64le \
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | FileCheck %s -check-prefix=CHECK-NOVSX
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu \
22 ; RUN: -mattr=+altivec -mattr=+vsx | FileCheck %s
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -march=ppc64le \
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu \
44 ; RUN: -mattr=+altivec -mattr=-vsx | FileCheck %s \
55 ; RUN: -check-prefix=CHECK-NOVSX
66
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | grep sth
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | grep sth
11
22 define <8 x i16> @insert(<8 x i16> %foo, i16 %a) nounwind {
33 entry:
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mcpu=g5 | FileCheck %s
11 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mattr=+altivec -mattr=-vsx -mattr=-power8-vector | FileCheck %s
22 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -mattr=+altivec -mattr=-vsx -mattr=-power8-vector | FileCheck %s -check-prefix=CHECK-LE
33
None ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -march=ppc32 -mattr=+altivec -mattr=-vsx -mattr=-power8-altivec | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -march=ppc64 -mattr=+altivec -mattr=-vsx -mcpu=pwr7 | FileCheck %s
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -march=ppc64 -mattr=+altivec -mattr=-vsx -mcpu=pwr8 -mattr=-power8-altivec | FileCheck %s -check-prefix=CHECK-LE
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -march=ppc64 -mattr=+altivec -mattr=+vsx -mcpu=pwr7 | FileCheck %s -check-prefix=CHECK-VSX
4 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -march=ppc64 -mattr=+altivec -mattr=+vsx -mcpu=pwr8 -mattr=-power8-altivec | FileCheck %s -check-prefix=CHECK-LE-VSX
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -mattr=+altivec -mattr=-vsx -mattr=-power8-altivec | FileCheck %s
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mattr=+altivec -mattr=-vsx -mcpu=pwr7 | FileCheck %s
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -mattr=+altivec -mattr=-vsx -mcpu=pwr8 -mattr=-power8-altivec | FileCheck %s -check-prefix=CHECK-LE
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mattr=+altivec -mattr=+vsx -mcpu=pwr7 | FileCheck %s -check-prefix=CHECK-VSX
4 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -mattr=+altivec -mattr=+vsx -mcpu=pwr8 -mattr=-power8-altivec | FileCheck %s -check-prefix=CHECK-LE-VSX
55
66 define <4 x i32> @test_v4i32(<4 x i32>* %X, <4 x i32>* %Y) {
77 %tmp = load <4 x i32>, <4 x i32>* %X ; <<4 x i32>> [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | not grep vperm
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | not grep vperm
11
22 define <4 x float> @test_uu72(<4 x float>* %P1, <4 x float>* %P2) {
33 %V1 = load <4 x float>, <4 x float>* %P1 ; <<4 x float>> [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5
11 ; PR3628
22
33 define void @update(<4 x i32> %val, <4 x i32>* %dst) nounwind {
0 ; RUN: opt -mtriple=powerpc-apple-darwin < %s -instcombine | \
1 ; RUN: llc -march=ppc32 -mcpu=g5 | not grep vperm
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 > %t
1 ; RUN: llc -mtriple=ppc32-- -mcpu=g5 | not grep vperm
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 > %t
33 ; RUN: grep vsldoi %t | count 2
44 ; RUN: grep vmrgh %t | count 7
55 ; RUN: grep vmrgl %t | count 6
0 ; Test that vectors are scalarized/lowered correctly.
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g3 | \
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g3 | \
22 ; RUN: grep stfs | count 4
3 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 -o %t
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 -o %t
44 ; RUN: grep vspltw %t | count 2
55 ; RUN: grep vsplti %t | count 3
66 ; RUN: grep vsplth %t | count 1
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mcpu=g5 | FileCheck %s
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -mcpu=g5 | FileCheck %s
11 ; Formerly incorrectly inserted vsldoi (endian confusion)
22
33 @baz = common global <16 x i8> zeroinitializer ; <<16 x i8>*> [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 -o %t
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 -o %t
11 ; RUN: grep vrlw %t
22 ; RUN: not grep spr %t
33 ; RUN: not grep vrsave %t
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | grep vxor
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | grep vxor
11
22 define void @foo(<4 x float>* %P) {
33 %T = load <4 x float>, <4 x float>* %P ; <<4 x float>> [#uses=1]
None ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | grep test:
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 | not grep vperm
0 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | grep test:
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 | not grep vperm
22
33 define void @test(<4 x float>* %tmp2.i) {
44 %tmp2.i.upgrd.1 = load <4 x float>, <4 x float>* %tmp2.i ; <<4 x float>> [#uses=4]
None ; RUN: llc -verify-machineinstrs -march=ppc64 -mtriple=ppc64-apple-darwin < %s | FileCheck %s
0 ; RUN: llc -verify-machineinstrs -mtriple=ppc64-apple-darwin < %s | FileCheck %s
11
22 ; CHECK-LABEL: {{^}}_merge_8_float_zero_stores:
33 ; CHECK: li [[ZEROREG:r[0-9]+]], 0
0 ; Test that vectors are scalarized/lowered correctly.
1 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g5 > %t
2 ; RUN: llc -verify-machineinstrs < %s -march=ppc32 -mcpu=g3 >> %t
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 > %t
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g3 >> %t
33
44 %d8 = type <8 x double>
55 %f1 = type <1 x float>