1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[PPC] Remove Darwin support from POWER backend.

This patch issues an error message if Darwin ABI is attempted with the PPC
backend. It also cleans up existing test cases, either converting the test to
use an alternative triple or removing the test if the coverage is no longer
needed.

Updated Tests
-------------
The majority of test cases were updated to use a different triple that does not
include the Darwin ABI. Many tests were also updated to use FileCheck, in place
of grep.

Deleted Tests
-------------
llvm/test/tools/dsymutil/PowerPC/sibling.test was originally added to test
specific functionality of dsymutil using an object file created with an old
version of llvm-gcc for a Powerbook G4. After a discussion with @JDevlieghere he
suggested removing the test.

llvm/test/CodeGen/PowerPC/combine_loads_from_build_pair.ll was converted from a
PPC test to a SystemZ test, as the behavior is also reproducible there.

All other tests that were deleted were specific to the darwin/ppc ABI and no
longer necessary.

Phabricator Review: https://reviews.llvm.org/D50988

llvm-svn: 340795
This commit is contained in:
Kit Barton 2018-08-28 01:18:29 +00:00
parent cfd04c50e1
commit 5fe828ca5e
131 changed files with 587 additions and 694 deletions

View File

@ -181,6 +181,9 @@ static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
const TargetOptions &Options) {
if (TT.isOSDarwin())
report_fatal_error("Darwin is no longer supported for PowerPC");
if (Options.MCOptions.getABIName().startswith("elfv1"))
return PPCTargetMachine::PPC_ABI_ELFv1;
else if (Options.MCOptions.getABIName().startswith("elfv2"))

View File

@ -1,6 +1,6 @@
; RUN: opt < %s -basicaa -licm -disable-output
target datalayout = "E-p:32:32"
target triple = "powerpc-apple-darwin8.7.0"
target triple = "powerpc-unknown-linux-gnu"
define void @glgRunProcessor() {
entry:

View File

@ -1,7 +1,7 @@
; RUN: llc -verify-machineinstrs < %s
target datalayout = "E-p:32:32"
target triple = "powerpc-apple-darwin8.2.0"
target triple = "powerpc-unknown-linux-gnu"
define void @bar(i32 %G, i32 %E, i32 %F, i32 %A, i32 %B, i32 %C, i32 %D, i8* %fmt, ...) {
%ap = alloca i8* ; <i8**> [#uses=2]

View File

@ -1,10 +1,10 @@
; RUN: llc -verify-machineinstrs < %s | not grep ", f1"
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
target datalayout = "E-p:32:32"
target triple = "powerpc-apple-darwin8.2.0"
target triple = "powerpc-unknown-linux-gnu"
; Dead argument should reserve an FP register.
define double @bar(double %DEAD, double %X, double %Y) {
; CHECK: fadd 1, 2, 3
%tmp.2 = fadd double %X, %Y ; <double> [#uses=1]
ret double %tmp.2
}

View File

@ -1,7 +1,7 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
; RUN: grep "vspltish v.*, 10"
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s
define void @test(<8 x i16>* %P) {
; CHECK: vspltish {{[0-9]+}}, 10
%tmp = load <8 x i16>, <8 x i16>* %P ; <<8 x i16>> [#uses=1]
%tmp1 = add <8 x i16> %tmp, < i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10 > ; <<8 x i16>> [#uses=1]
store <8 x i16> %tmp1, <8 x i16>* %P

View File

@ -1,7 +1,7 @@
; RUN: llc -verify-machineinstrs < %s
target datalayout = "E-p:64:64"
target triple = "powerpc64-apple-darwin8"
target triple = "powerpc64-unknown-linux-gnu"
define void @glArrayElement_CompExec() {
entry:

View File

@ -1,11 +1,12 @@
; RUN: llc -verify-machineinstrs < %s | grep xor
; RUN: llc -verify-machineinstrs < %s
target datalayout = "E-p:32:32"
target triple = "powerpc-apple-darwin8.7.0"
target triple = "powerpc-unknown-linux-gnu"
define void @foo(i32 %X) {
entry:
%tmp1 = and i32 %X, 3 ; <i32> [#uses=1]
; CHECK: xori 3, 3, 1
%tmp2 = xor i32 %tmp1, 1 ; <i32> [#uses=1]
%tmp = icmp eq i32 %tmp2, 0 ; <i1> [#uses=1]
br i1 %tmp, label %UnifiedReturnBlock, label %cond_true

View File

@ -1,8 +1,8 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | \
; RUN: grep cntlz
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
define i32 @foo() nounwind {
entry:
; CHECK: cntlzw 3, 4
%retval = alloca i32, align 4 ; <i32*> [#uses=2]
%temp = alloca i32, align 4 ; <i32*> [#uses=2]
%ctz_x = alloca i32, align 4 ; <i32*> [#uses=3]

View File

@ -1,4 +1,5 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8.8.0 | \
; RUN: grep align.*3
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
@X = global <{i32, i32}> <{ i32 1, i32 123 }>
; CHECK: align 3

View File

@ -1,9 +1,10 @@
; RUN: llc -verify-machineinstrs < %s
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
target datalayout = "E-p:32:32"
target triple = "powerpc-apple-darwin8.8.0"
target triple = "powerpc-unknown-linux-gnu"
; KB: FIXME: Need to figure out what this should be checking for (or whether test should be removed)
; CHECK: blargh
define void @blargh() {
entry:
%tmp4 = call i32 asm "rlwimi $0,$2,$3,$4,$5", "=r,0,r,n,n,n"( i32 0, i32 0, i32 0, i32 24, i32 31 ) ; <i32> [#uses=0]

View File

@ -1,12 +1,15 @@
; RUN: llc -verify-machineinstrs < %s | grep mflr | count 1
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
target datalayout = "e-p:32:32"
target triple = "powerpc-apple-darwin8"
target triple = "powerpc-unknown-linux-gnu"
@str = internal constant [18 x i8] c"hello world!, %d\0A\00" ; <[18 x i8]*> [#uses=1]
define i32 @main() {
entry:
; CHECK: main:
; CHECK: mflr
; CHECK-NOT: mflr
; CHECK: mtlr
%tmp = tail call i32 (i8*, ...) @printf( i8* getelementptr ([18 x i8], [18 x i8]* @str, i32 0, i32 0) ) ; <i32> [#uses=0]
ret i32 0
}

View File

@ -1,14 +1,15 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8.8.0 -no-integrated-as | grep "foo r3, r4"
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8.8.0 -no-integrated-as | grep "bari r3, 47"
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -no-integrated-as | FileCheck %s
; PR1351
define i32 @test1(i32 %Y, i32 %X) nounwind {
; CHECK: foo 3, 4
%tmp1 = tail call i32 asm "foo${1:I} $0, $1", "=r,rI"( i32 %X )
ret i32 %tmp1
}
define i32 @test2(i32 %Y, i32 %X) nounwind {
; CHECK: bari 3, 47
%tmp1 = tail call i32 asm "bar${1:I} $0, $1", "=r,rI"( i32 47 )
ret i32 %tmp1
}

View File

@ -2,13 +2,14 @@
; RUN: llc -verify-machineinstrs < %s -regalloc=fast -optimize-regalloc=0 | FileCheck %s
; The first argument of subfc must not be the same as any other register.
; CHECK: subfc [[REG:r.]],
; CHECK: APP
; CHECK: subfc [[REG:[0-9]+]],
; CHECK-NOT: [[REG]]
; CHECK: InlineAsm End
; CHECK: NO_APP
; PR1357
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"
target triple = "powerpc-apple-darwin8.8.0"
;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"
target triple = "powerpc-unknown-linux-gnu"
;long long test(int A, int B, int C) {
; unsigned X, Y;

View File

@ -1,8 +1,8 @@
; RUN: llc -verify-machineinstrs -no-integrated-as < %s
; PR1382
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"
target triple = "powerpc-apple-darwin8.8.0"
;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"
target triple = "powerpc-unknown-linux-gnu"
@x = global [2 x i32] [ i32 1, i32 2 ] ; <[2 x i32]*> [#uses=1]
define void @foo() {

View File

@ -1,6 +1,6 @@
; RUN: llc -verify-machineinstrs < %s
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"
target triple = "powerpc-apple-darwin8.8.0"
target triple = "powerpc-unknown-linux-gnu"
%struct..0anon = type { i32 }
%struct.A = type { %struct.anon }
%struct.anon = type <{ }>

View File

@ -6,7 +6,7 @@
; ModuleID = 'tail.c'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "i686-apple-darwin8"
;; target triple = "i686-apple-darwin8"
define i32 @f(i32 %i, i32 %q) {
entry:

View File

@ -1,7 +1,11 @@
; RUN: llc -verify-machineinstrs < %s | grep "rlwinm r3, r3, 23, 30, 30"
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
; PR1473
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"
target triple = "powerpc-apple-darwin8.8.0"
target triple = "powerpc-unknown-linux-gnu"
; CHECK: foo
; CHECK: rlwinm 3, 3, 23, 30, 30
; CHECK: blr
define zeroext i8 @foo(i16 zeroext %a) {
%tmp2 = lshr i16 %a, 10 ; <i16> [#uses=1]

View File

@ -1,10 +1,8 @@
; RUN: llc -verify-machineinstrs -mattr=-vsx < %s | grep stfd | count 3
; RUN: llc -verify-machineinstrs -mattr=-vsx < %s | grep stfs | count 1
; RUN: llc -verify-machineinstrs -mattr=-vsx < %s | grep lfd | count 2
; RUN: llc -verify-machineinstrs -mattr=-vsx < %s | grep lfs | count 2
; RUN: llc -verify-machineinstrs -mattr=-vsx < %s | FileCheck %s
; ModuleID = 'foo.c'
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc-apple-darwin8"
target triple = "powerpc-unknown-linux-gnu"
%struct.anon = type <{ i8, float }>
@s = global %struct.anon <{ i8 3, float 0x4014666660000000 }> ; <%struct.anon*> [#uses=1]
@u = global <{ i8, double }> <{ i8 3, double 5.100000e+00 }> ; <<{ i8, double }>*> [#uses=1]
@ -12,6 +10,12 @@ target triple = "powerpc-apple-darwin8"
@v = weak global <{ i8, double }> zeroinitializer ; <<{ i8, double }>*> [#uses=2]
@.str = internal constant [8 x i8] c"%f %lf\0A\00" ; <[8 x i8]*> [#uses=1]
; CHECK: foo
; CHECK: lfs
; CHECK: lfd
; CHECK: stfs
; CHECK: stfd
; CHECK: blr
define i32 @foo() {
entry:
%retval = alloca i32, align 4 ; <i32*> [#uses=1]
@ -31,6 +35,10 @@ return: ; preds = %entry
ret i32 %retval6
}
; CHECK: main
; CHECK: lfs
; CHECK: lfd
; CHECK: blr
define i32 @main() {
entry:
%retval = alloca i32, align 4 ; <i32*> [#uses=1]

View File

@ -1,7 +1,11 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s
declare void @cxa_atexit_check_1(i8*)
; TODO: KB: ORiginal test case was just checking it compiles; is this worth keeping?
; CHECK: check_cxa_atexit:
; CHECK: blr
define i32 @check_cxa_atexit(i32 (void (i8*)*, i8*, i8*)* %cxa_atexit, void (i8*)* %cxa_finalize) {
entry:
%tmp7 = call i32 null( void (i8*)* @cxa_atexit_check_1, i8* null, i8* null ) ; <i32> [#uses=0]

View File

@ -1,4 +1,4 @@
; RUN: llc < %s -mtriple=powerpc64-apple-darwin9 -regalloc=fast -optimize-regalloc=0 -relocation-model=pic
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -regalloc=fast -optimize-regalloc=0 -relocation-model=pic | FileCheck %s
%struct.NSError = type opaque
%struct.NSManagedObjectContext = type opaque
@ -14,6 +14,11 @@
@"\01L_OBJC_MESSAGE_REF_5" = external global %struct._message_ref_t ; <%struct._message_ref_t*> [#uses=2]
@"\01L_OBJC_MESSAGE_REF_4" = external global %struct._message_ref_t ; <%struct._message_ref_t*> [#uses=1]
; TODO: KB: ORiginal test case was just checking it compiles; is this worth keeping?
; CHECK: managedObjectContextWithModelURL
; CHECK-NOT: blr
; CHECK: .cfi_endproc
define %struct.NSManagedObjectContext* @"+[ListGenerator(Private) managedObjectContextWithModelURL:storeURL:]"(%struct.objc_object* %self, %struct._message_ref_t* %_cmd, %struct.NSURL* %modelURL, %struct.NSURL* %storeURL) {
entry:
%storeCoordinator = alloca %struct.NSPersistentStoreCoordinator* ; <%struct.NSPersistentStoreCoordinator**> [#uses=0]

View File

@ -1,4 +1,4 @@
; RUN: llc < %s -mtriple=powerpc64-apple-darwin9 -regalloc=fast -optimize-regalloc=0 -relocation-model=pic
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -regalloc=fast -optimize-regalloc=0 -relocation-model=pic | FileCheck %s
%struct.NSError = type opaque
%struct.NSManagedObjectContext = type opaque
@ -12,6 +12,11 @@
@NSXMLStoreType = external constant %struct.NSString* ; <%struct.NSString**> [#uses=1]
@"\01L_OBJC_MESSAGE_REF_4" = external global %struct._message_ref_t ; <%struct._message_ref_t*> [#uses=2]
; TODO: KB: ORiginal test case was just checking it compiles; is this worth keeping?
; CHECK: managedObjectContextWithModelURL
; CHECK-NOT: blr
; CHECK: .cfi_endproc
define %struct.NSManagedObjectContext* @"+[ListGenerator(Private) managedObjectContextWithModelURL:storeURL:]"(%struct.objc_object* %self, %struct._message_ref_t* %_cmd, %struct.NSURL* %modelURL, %struct.NSURL* %storeURL) {
entry:
%tmp27 = load %struct.objc_object* (%struct.objc_object*, %struct._message_ref_t*, ...)*, %struct.objc_object* (%struct.objc_object*, %struct._message_ref_t*, ...)** getelementptr (%struct._message_ref_t, %struct._message_ref_t* @"\01L_OBJC_MESSAGE_REF_2", i32 0, i32 0), align 8 ; <%struct.objc_object* (%struct.objc_object*, %struct._message_ref_t*, ...)*> [#uses=1]

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu
%struct.HDescriptor = type <{ i32, i32 }>

View File

@ -1,20 +1,20 @@
; RUN: llc -mcpu=g5 < %s | FileCheck %s
; RUN: llc < %s | FileCheck %s
;; Formerly crashed, see PR 1508
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"
target triple = "powerpc64-apple-darwin8"
target triple = "powerpc64-unknown-linux-gnu"
%struct.Range = type { i64, i64 }
; CHECK: .cfi_startproc
; CHECK: .cfi_personality 155, L___gxx_personality_v0$non_lazy_ptr
; CHECK: .cfi_lsda 16, Lexception0
; CHECK: .cfi_personality 148, DW.ref.__gxx_personality_v0
; CHECK: .cfi_lsda 20, .Lexception0
; CHECK: .cfi_def_cfa_offset 176
; CHECK: .cfi_offset r31, -8
; CHECK: .cfi_offset lr, 16
; CHECK: .cfi_def_cfa_register r31
; CHECK: .cfi_offset r27, -16
; CHECK: .cfi_offset r28, -24
; CHECK: .cfi_offset r29, -32
; CHECK: .cfi_offset r30, -40
; CHECK: .cfi_offset r27, -40
; CHECK: .cfi_offset r28, -32
; CHECK: .cfi_offset r29, -24
; CHECK: .cfi_offset r30, -16
; CHECK: .cfi_endproc

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
%struct.Handle = type { %struct.oopDesc** }
%struct.JNI_ArgumentPusher = type { %struct.SignatureIterator, %struct.JavaCallArguments* }
@ -11,6 +11,8 @@
%struct.oopDesc = type { %struct.instanceOopDesc*, %struct.instanceOopDesc* }
@.str = external constant [44 x i8] ; <[44 x i8]*> [#uses=1]
; CHECK: _ZN23JNI_ArgumentPusherArray7iterateEy
; CHECK: blr
define void @_ZN23JNI_ArgumentPusherArray7iterateEy(%struct.JNI_ArgumentPusherArray* %this, i64 %fingerprint) nounwind {
entry:
br label %bb113

View File

@ -1,5 +1,7 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -regalloc=fast -optimize-regalloc=0
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -regalloc=fast -optimize-regalloc=0 | FileCheck %s
; CHECK: @bork
; CHECK: blr
define i32 @bork(i64 %foo, i64 %bar) {
entry:
%tmp = load i64, i64* null, align 8 ; <i64> [#uses=2]

View File

@ -1,7 +1,10 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
declare i8* @bar(i32)
; CHECK: @foo
; CHECK: blr
define void @foo(i8* %pp) nounwind {
entry:
%tmp2 = tail call i8* @bar( i32 14 ) nounwind ; <i8*> [#uses=0]

View File

@ -1,5 +1,7 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
; CHECK: @t
; CHECK: blr
define i32 @t(i64 %byteStart, i32 %activeIndex) nounwind {
entry:
%tmp50 = load i32, i32* null, align 4 ; <i32> [#uses=1]

View File

@ -1,5 +1,7 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
; CHECK: @nonzero_bits1
; CHECK: blr
define fastcc i64 @nonzero_bits1() nounwind {
entry:
switch i32 0, label %bb1385 [

View File

@ -1,8 +1,11 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
; Avoid reading memory that's already freed.
@llvm.used = appending global [1 x i8*] [ i8* bitcast (i32 (i64)* @_Z13GetSectorSizey to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0]
; CHECK: @_Z13GetSectorSizey
; CHECK: blr
define i32 @_Z13GetSectorSizey(i64 %Base) nounwind {
entry:
br i1 false, label %bb, label %UnifiedReturnBlock

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
@_ZL10DeviceCode = internal global i16 0 ; <i16*> [#uses=1]
@.str19 = internal constant [64 x i8] c"unlock_then_erase_sector: failed to erase block (status= 0x%x)\0A\00" ; <[64 x i8]*> [#uses=1]
@ -10,6 +10,8 @@ declare void @IOLog(i8*, ...)
declare void @IODelay(i32)
; CHECK: @_Z14ProgramByWordsPvyy
; CHECK: blr
define i32 @_Z14ProgramByWordsPvyy(i8* %buffer, i64 %Offset, i64 %bufferSize) nounwind {
entry:
store volatile i8 -1, i8* null, align 1

View File

@ -1,6 +1,16 @@
; RUN: llc -verify-machineinstrs < %s
target triple = "powerpc-apple-darwin9.2.2"
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
target triple = "powerpc-unknown-linux-gnu"
; CHECK: func:
; CHECK: li 3, 0
; CHECK: li 4, 0
; CHECK: li 5, 0
; CHECK: li 6, 0
; CHECK: li 7, 0
; CHECK: li 8, 0
; CHECK: li 9, 0
; CHECK: li 10, 0
; CHECK: blr
define i256 @func(ppc_fp128 %a, ppc_fp128 %b, ppc_fp128 %c, ppc_fp128 %d) nounwind readnone {
entry:
br i1 false, label %bb36, label %bb484

View File

@ -1,6 +1,7 @@
; RUN: llc -verify-machineinstrs < %s
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc-apple-darwin9"
target triple = "powerpc-unknown-linux-gnu"
%struct.BiPartSrcDescriptor = type <{ %"struct.BiPartSrcDescriptor::$_105" }>
%"struct.BiPartSrcDescriptor::$_105" = type { %struct.BiPartSrcDescriptor_NO_VECTOR_ALIGNMENT_size_is_16 }
%struct.BiPartSrcDescriptor_NO_VECTOR_ALIGNMENT_size_is_16 = type { [2 x %struct.MotionVectors], [2 x i8], %struct.Map4x4ToPartIdx, [2 x i8], i8, i8 }
@ -84,6 +85,9 @@ declare void @jvtDisposePTRMemAligned(i8*)
declare void @_Z31LoopFilter_Internal_ResetTablesP14LoopFilterInfo(%struct.LoopFilterInfo*) nounwind
; CHECK: _Z60LoopFilter_Internal_CalculateBoundaryStrengths_MbaffFramePicPK14LoopFilterInfoP22FrameMotionVectorCachejj
; CHECK: blr
define i32 @_Z60LoopFilter_Internal_CalculateBoundaryStrengths_MbaffFramePicPK14LoopFilterInfoP22FrameMotionVectorCachejj(%struct.LoopFilterInfo* %lfiPtr, %struct.FrameMotionVectorCache* %frameMotionVectorCachePtr, i32 %mbY_min, i32 %mbY_maxPlus1) nounwind {
entry:
icmp ult i32 %mbY_min, %mbY_maxPlus1 ; <i1>:0 [#uses=1]

View File

@ -1,7 +1,10 @@
; RUN: llc -verify-machineinstrs < %s
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc-apple-darwin9"
target triple = "powerpc64-unknown-linux-gnu"
; CHECK: __divtc3
; CHECK: fabs 0, 7
; CHECK: blr
define hidden i256 @__divtc3(ppc_fp128 %a, ppc_fp128 %b, ppc_fp128 %c, ppc_fp128 %d) nounwind readnone {
entry:
call ppc_fp128 @fabsl( ppc_fp128 %d ) nounwind readnone ; <ppc_fp128>:0 [#uses=1]

View File

@ -1,7 +1,13 @@
; RUN: llc -verify-machineinstrs < %s
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc-apple-darwin9"
target triple = "powerpc-unknown-linux-gnu"
; CHECK: t
; CHECK: mr 4, 3
; CHECK: lbz 3
; CHECK: extsb 5, 3
; CHECK: sth 5
; CHECK: blr
define signext i16 @t(i16* %dct) nounwind {
entry:
load i16, i16* null, align 2 ; <i16>:0 [#uses=2]

View File

@ -1,7 +1,11 @@
; RUN: llc -verify-machineinstrs < %s
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc-apple-darwin9"
target triple = "powerpc-unknown-linux-gnu"
; CHECK: __fixunstfdi
; CHECK: li 3, 0
; CHECK: li 4, 0
; CHECK: blr
define hidden i64 @__fixunstfdi(ppc_fp128 %a) nounwind {
entry:
br i1 false, label %bb3, label %bb4

View File

@ -1,7 +1,10 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin | grep lwz | grep 228
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s
@"\01LC" = internal constant [4 x i8] c"%d\0A\00" ; <[4 x i8]*> [#uses=1]
; CHECK: llvm_static_func
; CHECK: lwz {{[0-9]+}}, 228(1)
define void @llvm_static_func(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %a4, i32 %a5, i32 %a6, i32 %a7, i32 %a8, i32 %a9, i32 %a10, i32 %a11, i32 %a12, i32 %a13, i32 %a14, i32 %a15) nounwind {
entry:
tail call i32 (i8*, ...) @printf( i8* getelementptr ([4 x i8], [4 x i8]* @"\01LC", i32 0, i64 0), i32 %a8 ) nounwind ; <i32>:0 [#uses=0]

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
%struct.CGLDI = type { %struct.cgli*, i32, i32, i32, i32, i32, i8*, i32, void (%struct.CGLSI*, i32, %struct.CGLDI*)*, i8*, %struct.vv_t }
%struct.cgli = type { i32, %struct.cgli*, void (%struct.cgli*, i8*, i8*, i32, i32, i32, i32, i32, i32, i32, i32)*, i32, i8*, i8*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i8*, i32*, %struct._cgro*, %struct._cgro*, float, float, float, float, i32, i8*, float, i8*, [16 x i32] }
@ -8,6 +8,8 @@
%struct.vv_t = type { <16 x i8> }
@llvm.used = appending global [1 x i8*] [ i8* bitcast (void (%struct.CGLSI*, i32, %struct.CGLDI*)* @lb to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0]
; CHECK: lb
; CHECK: blr
define void @lb(%struct.CGLSI* %src, i32 %n, %struct.CGLDI* %dst) nounwind {
entry:
%0 = load i32, i32* null, align 4 ; <i32> [#uses=1]

View File

@ -6,7 +6,7 @@
; XFAIL: *
; PR2356
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc-apple-darwin9"
target triple = "powerpc-unknown-linux-gnu"
define i32 @test(i64 %x, i32* %p) nounwind {
%asmtmp = call i32 asm "", "=r,0"(i64 0) nounwind ; <i32> [#uses=0]

View File

@ -1,7 +1,7 @@
; RUN: llc -verify-machineinstrs < %s
; PR2988
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc-apple-darwin10.0"
target triple = "powerpc-unknown-linux-gnu"
@a = common global ppc_fp128 0xM00000000000000000000000000000000, align 16 ; <ppc_fp128*> [#uses=2]
@b = common global ppc_fp128 0xM00000000000000000000000000000000, align 16 ; <ppc_fp128*> [#uses=2]
@c = common global ppc_fp128 0xM00000000000000000000000000000000, align 16 ; <ppc_fp128*> [#uses=3]

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin9.5
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu.5
define void @__multc3({ ppc_fp128, ppc_fp128 }* noalias sret %agg.result, ppc_fp128 %a, ppc_fp128 %b, ppc_fp128 %c, ppc_fp128 %d) nounwind {
entry:

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin9.5
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu.5
; rdar://6499616
@"\01LC" = internal constant [13 x i8] c"conftest.val\00" ; <[13 x i8]*> [#uses=1]

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin10
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu
; rdar://6692215
define fastcc void @_qsort(i8* %a, i32 %n, i32 %es, i32 (i8*, i8*)* %cmp, i32 %depth_limit) nounwind optsize ssp {

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin10
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu
; PR4280
define i32 @__fixunssfsi(float %a) nounwind readnone {

View File

@ -1,7 +1,7 @@
; RUN: llc -verify-machineinstrs < %s -mcpu=g5 -disable-ppc-ilp-pref | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -disable-ppc-ilp-pref | FileCheck %s
; ModuleID = '<stdin>'
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc-apple-darwin10.0"
target triple = "powerpc-unknown-linux-gnu"
; It is wrong on powerpc to substitute reg+reg for $0; the stw opcode
; would have to change.
@ -10,8 +10,8 @@ target triple = "powerpc-apple-darwin10.0"
define void @foo(i32 %y) nounwind ssp {
entry:
; CHECK: foo
; CHECK: add r2
; CHECK: 0(r2)
; CHECK: add [[REG:[0-9]+]]
; CHECK: 0([[REG]])
%y_addr = alloca i32 ; <i32*> [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i32 %y, i32* %y_addr

View File

@ -1,7 +1,7 @@
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
; ModuleID = '<stdin>'
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc-apple-darwin9.6"
target triple = "powerpc-unknown-linux-gnu.6"
define i64 @foo(i64 %r.0.ph, i64 %q.0.ph, i32 %sr1.1.ph) nounwind {
entry:

View File

@ -1,4 +1,4 @@
; RUN: llc < %s -mtriple=powerpc-apple-darwin8
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu
define void @gcov_exit() nounwind {
entry:

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin9.5 -mcpu=g5
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu.5 -mcpu=g5
; rdar://7422268
%struct..0EdgeT = type { i32, i32, float, float, i32, i32, i32, float, i32, i32 }

View File

@ -1,20 +1,20 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin10 -relocation-model=pic -disable-fp-elim | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -relocation-model=pic -disable-fp-elim | FileCheck %s
; <rdar://problem/7604010>
%cmd.type = type { }
@_cmd = constant %cmd.type zeroinitializer
; CHECK: .globl __cmd
; CHECK: .globl _cmd
; CHECK-NEXT: .p2align 3
; CHECK-NEXT: __cmd:
; CHECK-NEXT: .byte 0
; CHECK-NEXT: _cmd:
; CHECK-NEXT: .size _cmd, 0
; PR6340
%Ty = type { i32, {}, i32 }
@k = global %Ty { i32 1, {} zeroinitializer, i32 3 }
; CHECK: _k:
; CHECK: k:
; CHECK-NEXT: .long 1
; CHECK-NEXT: .long 3

View File

@ -1,22 +1,17 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -mcpu=g4 -break-anti-dependencies=none | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -break-anti-dependencies=none | FileCheck %s
; ModuleID = 'hh.c'
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128-n32"
target triple = "powerpc-apple-darwin9.6"
;;;;; 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-n32"
target triple = "powerpc-unknown-linux-gnu.6"
define void @foo() nounwind {
entry:
; Note that part of what is being checked here is proper register reuse.
; CHECK: mfcr [[T1:r[0-9]+]] ; cr2
; CHECK: lis [[T2:r[0-9]+]], 1
; CHECK: rotlwi [[T1]], [[T1]], 8
; CHECK: ori [[T2]], [[T2]], 34540
; CHECK: stwx [[T1]], r1, [[T2]]
; CHECK: mfcr [[T4:r[0-9]+]] ; cr3
; CHECK: lis [[T3:r[0-9]+]], 1
; CHECK: rotlwi [[T4]], [[T4]], 12
; CHECK: ori [[T3]], [[T3]], 34536
; CHECK: stwx [[T4]], r1, [[T3]]
; CHECK: addi r3, r1, 72
; CHECK: mfcr [[T1:[0-9]+]]
; CHECK-DAG: subf 0, 0, 1
; CHECK-DAG: ori [[T2:[0-9]+]], [[T2]], 34492
; CHECK-DAG: stwx [[T1]], 1, [[T2]]
; CHECK-DAG: addi 3, 1, 28
; CHECK: bl bar@PLT
%x = alloca [100000 x i8] ; <[100000 x i8]*> [#uses=1]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
%x1 = bitcast [100000 x i8]* %x to i8* ; <i8*> [#uses=1]
@ -25,16 +20,10 @@ entry:
br label %return
return: ; preds = %entry
; CHECK: lis [[T1:r[0-9]+]], 1
; CHECK: ori [[T1]], [[T1]], 34536
; CHECK: lwzx [[T1]], r1, [[T1]]
; CHECK: rotlwi [[T1]], [[T1]], 20
; CHECK: mtcrf 16, [[T1]]
; CHECK: lis [[T1]], 1
; CHECK: ori [[T1]], [[T1]], 34540
; CHECK: lwzx [[T1]], r1, [[T1]]
; CHECK: rotlwi [[T1]], [[T1]], 24
; CHECK: ori [[T2]], [[T2]], 34492
; CHECK: lwzx [[T1]], 1, [[T2]]
; CHECK: mtcrf 32, [[T1]]
; CHECK: mtcrf 16, [[T1]]
ret void
}

View File

@ -1,15 +1,15 @@
; RUN: llc -verify-machineinstrs < %s -mcpu=g5 -mtriple=powerpc-apple-darwin10.0 | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
; ModuleID = 'nn.c'
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc-apple-darwin11.0"
; Indirect calls must use R12 on Darwin (i.e., R12 must contain the address of
target triple = "powerpc-unknown-linux-gnu"
; Indirect calls must use R3 on powerpc (i.e., R3 must contain the address of
; the function being called; the mtctr is not required to use it).
@p = external global void (...)* ; <void (...)**> [#uses=1]
define void @foo() nounwind ssp {
entry:
; CHECK: mtctr r12
; CHECK: mtctr 3
; CHECK: bctrl
%0 = load void (...)*, void (...)** @p, align 4 ; <void (...)*> [#uses=1]
call void (...) %0() nounwind

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin10.0
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu
; rdar://7819990
%0 = type { i32 }

View File

@ -1,12 +1,12 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -mcpu=g5 | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -mcpu=g5 -regalloc=basic | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -regalloc=basic | FileCheck %s
declare i8* @llvm.frameaddress(i32) nounwind readnone
define i8* @g2() nounwind readnone {
entry:
; CHECK: _g2:
; CHECK: lwz r3, 0(r1)
; CHECK: g2:
; CHECK: lwz 3, 0(1)
%0 = tail call i8* @llvm.frameaddress(i32 1) ; <i8*> [#uses=1]
ret i8* %0
}
@ -15,11 +15,11 @@ declare i8* @llvm.returnaddress(i32) nounwind readnone
define i8* @g() nounwind readnone {
entry:
; CHECK: _g:
; CHECK: mflr r0
; CHECK: stw r0, 8(r1)
; CHECK: lwz r2, 0(r1)
; CHECK: lwz r3, 8(r2)
; CHECK: g:
; CHECK: mflr 0
; CHECK: stw 0, 4(1)
; CHECK: lwz 3, 4(3)
; CHECK: lwz 0, 20(1)
%0 = tail call i8* @llvm.returnaddress(i32 1) ; <i8*> [#uses=1]
ret i8* %0
}

View File

@ -1,13 +1,13 @@
; RUN: llc -verify-machineinstrs -disable-fp-elim < %s | FileCheck %s
; PR8749
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-n32"
target triple = "powerpc-apple-darwin9.8"
target triple = "powerpc-unknown-linux-gnu.8"
define i32 @main() nounwind {
entry:
; Make sure we're generating references using the red zone
; CHECK-LABEL: main:
; CHECK: stw r2, -12(r1)
; CHECK: stwu 1, -32(1)
%retval = alloca i32
%0 = alloca i32
%"alloca point" = bitcast i32 0 to i32

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -mcpu=g4 -disable-ppc-ilp-pref | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -mcpu=g4 -disable-ppc-ilp-pref | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=g4 -disable-ppc-ilp-pref | FileCheck %s
; ModuleID = 'tsc.c'

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -mcpu=g4 | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -mcpu=g4 | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=g4 | FileCheck %s
; ModuleID = 'tsc.c'

View File

@ -7,7 +7,7 @@
; XFAIL: *
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"
target triple = "powerpc64-apple-darwin9"
target triple = "powerpc64-unknown-linux-gnu"
@sc = common global i8 0
@uc = common global i8 0

View File

@ -1,28 +1,24 @@
; RUN: llc < %s -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32
; RUN: llc < %s -mtriple=powerpc64-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC64
; RUN: llc < %s -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC32-NOFP
; RUN: llc < %s -mtriple=powerpc64-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC64-NOFP
; RUN: llc < %s -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32
; RUN: llc < %s -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32-RS
; RUN: llc < %s -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC32-RS-NOFP
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK-PPC32
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK-PPC64
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC32-NOFP
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC64-NOFP
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK-PPC32
; CHECK-PPC32: stw r31, -4(r1)
; CHECK-PPC32: lwz r1, 0(r1)
; CHECK-PPC32: lwz r31, -4(r1)
; CHECK-PPC32-NOFP: stw r31, -4(r1)
; CHECK-PPC32-NOFP: lwz r1, 0(r1)
; CHECK-PPC32-NOFP: lwz r31, -4(r1)
; CHECK-PPC32-RS: stwu r1, -48(r1)
; CHECK-PPC32-RS-NOFP: stwu r1, -48(r1)
; CHECK-PPC32: stwu 1, -32(1)
; CHECK-PPC32: stw 31, 28(1)
; CHECK-PPC32: lwz 31, 0(1)
; CHECK-PPC32-NOFP: stwu 1, -32(1)
; CHECK-PPC32-NOFP: stw 31, 28(1)
; CHECK-PPC32-NOFP: lwz 31, 0(1)
; CHECK-PPC64: std r31, -8(r1)
; CHECK-PPC64: stdu r1, -64(r1)
; CHECK-PPC64: ld r1, 0(r1)
; CHECK-PPC64: ld r31, -8(r1)
; CHECK-PPC64-NOFP: std r31, -8(r1)
; CHECK-PPC64-NOFP: stdu r1, -64(r1)
; CHECK-PPC64-NOFP: ld r1, 0(r1)
; CHECK-PPC64-NOFP: ld r31, -8(r1)
; CHECK-PPC64: std 31, -8(1)
; CHECK-PPC64: stdu 1, -64(1)
; CHECK-PPC64: ld 1, 0(1)
; CHECK-PPC64: ld 31, -8(1)
; CHECK-PPC64-NOFP: std 31, -8(1)
; CHECK-PPC64-NOFP: stdu 1, -64(1)
; CHECK-PPC64-NOFP: ld 1, 0(1)
; CHECK-PPC64-NOFP: ld 31, -8(1)
define i32* @f1(i32 %n) nounwind {
%tmp = alloca i32, i32 %n ; <i32*> [#uses=1]

View File

@ -1,51 +1,53 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=PPC32-NOFP
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=PPC32-FP
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -check-prefix=PPC32-NOFP
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -disable-fp-elim | FileCheck %s -check-prefix=PPC32-FP
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin8 | FileCheck %s -check-prefix=PPC64-NOFP
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=PPC64-FP
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=PPC64-NOFP
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -disable-fp-elim | FileCheck %s -check-prefix=PPC64-FP
define i32* @f1() nounwind {
%tmp = alloca i32, i32 8191 ; <i32*> [#uses=1]
ret i32* %tmp
}
; PPC32-NOFP: _f1:
; PPC32-NOFP: lis r0, -1
; PPC32-NOFP: ori r0, r0, 32736
; PPC32-NOFP: stwux r1, r1, r0
; PPC32-NOFP: addi r3, r1, 36
; PPC32-NOFP: lwz r1, 0(r1)
; PPC32-NOFP: blr
; PPC32-NOFP: f1:
; PPC32-NOFP: lis 0, -1
; PPC32-NOFP: ori 0, 0, 32752
; PPC32-NOFP: stwux 1, 1, 0
; PPC32-NOFP-DAG: addi 3, 1, 20
; PPC32-NOFP-DAG: lwz 31, 0(1)
; PPC32-NOFP: mr 1, 31
; PPC32-NOFP: mr 31, 0
; PPC32-NOFP: blr
; PPC32-FP: lis 0, -1
; PPC32-FP: ori 0, 0, 32752
; PPC32-FP: stwux 1, 1, 0
; PPC32-FP: subf 0, 0, 1
; PPC32-FP: addic 0, 0, -4
; PPC32-FP: stwx 31, 0, 0
; PPC32-FP: mr 31, 1
; PPC32-FP: addi 3, 31, 16
; PPC32-FP: lwz 31, 0(1)
; PPC32-FP: lwz 0, -4(31)
; PPC32-FP: mr 1, 31
; PPC32-FP: mr 31, 0
; PPC32-FP: blr
; PPC32-FP: _f1:
; PPC32-FP: lis r0, -1
; PPC32-FP: ori r0, r0, 32736
; PPC32-FP: stw r31, -4(r1)
; PPC32-FP: stwux r1, r1, r0
; PPC32-FP: mr r31, r1
; PPC32-FP: addi r3, r31, 32
; PPC32-FP: lwz r1, 0(r1)
; PPC32-FP: lwz r31, -4(r1)
; PPC32-FP: blr
; PPC64-NOFP: f1:
; PPC64-NOFP: lis 0, -1
; PPC64-NOFP: ori 0, 0, 32720
; PPC64-NOFP: stdux 1, 1, 0
; PPC64-NOFP: addi 3, 1, 52
; PPC64-NOFP: ld 1, 0(1)
; PPC64-NOFP: blr
; PPC64-NOFP: _f1:
; PPC64-NOFP: lis r0, -1
; PPC64-NOFP: ori r0, r0, 32720
; PPC64-NOFP: stdux r1, r1, r0
; PPC64-NOFP: addi r3, r1, 52
; PPC64-NOFP: ld r1, 0(r1)
; PPC64-NOFP: blr
; PPC64-FP: _f1:
; PPC64-FP: lis r0, -1
; PPC64-FP: ori r0, r0, 32704
; PPC64-FP: std r31, -8(r1)
; PPC64-FP: stdux r1, r1, r0
; PPC64-FP: mr r31, r1
; PPC64-FP: addi r3, r31, 60
; PPC64-FP: ld r1, 0(r1)
; PPC64-FP: ld r31, -8(r1)
; PPC64-FP: blr
; PPC64-FP: f1:
; PPC64-FP: lis 0, -1
; PPC64-FP: ori 0, 0, 32704
; PPC64-FP: std 31, -8(1)
; PPC64-FP: stdux 1, 1, 0
; PPC64-FP: mr 31, 1
; PPC64-FP: addi 3, 31, 60
; PPC64-FP: ld 1, 0(1)
; PPC64-FP: ld 31, -8(1)
; PPC64-FP: blr

View File

@ -1,26 +1,33 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 -o %t1
; RUN: not grep "stw r31, -4(r1)" %t1
; RUN: grep "stwu r1, -16416(r1)" %t1
; RUN: grep "addi r1, r1, 16416" %t1
; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | \
; RUN: not grep "lwz r31, -4(r1)"
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 -disable-fp-elim \
; RUN: -o %t2
; RUN: grep "stw r31, -4(r1)" %t2
; RUN: grep "stwu r1, -16416(r1)" %t2
; RUN: grep "addi r1, r1, 16416" %t2
; RUN: grep "lwz r31, -4(r1)" %t2
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin8 -o %t3
; RUN: not grep "std r31, -8(r1)" %t3
; RUN: grep "stdu r1, -16432(r1)" %t3
; RUN: grep "addi r1, r1, 16432" %t3
; RUN: not grep "ld r31, -8(r1)" %t3
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin8 -disable-fp-elim \
; RUN: -o %t4
; RUN: grep "std r31, -8(r1)" %t4
; RUN: grep "stdu r1, -16448(r1)" %t4
; RUN: grep "addi r1, r1, 16448" %t4
; RUN: grep "ld r31, -8(r1)" %t4
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -check-prefix=PPC32-FP
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -disable-fp-elim | FileCheck %s -check-prefix=PPC32-NOFP
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=PPC64-FP
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -disable-fp-elim | FileCheck %s -check-prefix=PPC64-NOFP
;PPC32-FP: f1:
;PPC32-FP: stwu 1, -16400(1)
;PPC32-FP: addi 3, 1, 20
;PPC32-FP: addi 1, 1, 16400
;PPC32-FP: blr
;PPC32-NOFP: f1:
;PPC32-NOFP: stwu 1, -16400(1)
;PPC32-NOFP: stw 31, 16396(1)
;PPC32-NOFP: lwz 31, 16396(1)
;PPC32-NOFP: addi 1, 1, 16400
;PPC32-NOFP: blr
;PPC64-FP: f1:
;PPC64-FP: stdu 1, -16432(1)
;PPC64-FP: addi 1, 1, 16432
;PPC64-FP: blr
;PPC64-NOFP: f1:
;PPC64-NOFP: std 31, -8(1)
;PPC64-NOFP: stdu 1, -16448(1)
;PPC64-NOFP: addi 1, 1, 16448
;PPC64-NOFP: ld 31, -8(1)
;PPC64-NOFP: blr
define i32* @f1() {
%tmp = alloca i32, i32 4095 ; <i32*> [#uses=1]

View File

@ -1,15 +1,24 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin | \
; RUN: grep "stw r3, 32751"
; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-apple-darwin | \
; RUN: grep "stw r3, 32751"
; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-apple-darwin | \
; RUN: grep "std r3, 9024"
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -check-prefix=PPC32
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=PPC64
; PPC32: test
; PPC32: 4, 32751(3)
; PPC32: blr
; PPC64: test
; PPC64: 4, 32751(3)
; PPC64: blr
define void @test() nounwind {
store i32 0, i32* inttoptr (i64 48725999 to i32*)
ret void
}
; PPC32: test2
; PPC32: stw 4, 9028(3)
; PPC32: stw 4, 9024(3)
; PPC32: blr
; PPC64: test2
; PPC64: std 4, 9024(3)
; PPC64: blr
define void @test2() nounwind {
store i64 0, i64* inttoptr (i64 74560 to i64*)
ret void

View File

@ -1,13 +1,13 @@
; All of these should be codegen'd without loading immediates
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
define i64 @add_ll(i64 %a, i64 %b) nounwind {
entry:
%tmp.2 = add i64 %b, %a ; <i64> [#uses=1]
ret i64 %tmp.2
; CHECK-LABEL: add_ll:
; CHECK: addc r4, r6, r4
; CHECK: adde r3, r5, r3
; CHECK: addc 4, 6, 4
; CHECK: adde 3, 5, 3
; CHECK: blr
}
@ -16,8 +16,8 @@ entry:
%tmp.1 = add i64 %a, 5 ; <i64> [#uses=1]
ret i64 %tmp.1
; CHECK-LABEL: add_l_5:
; CHECK: addic r4, r4, 5
; CHECK: addze r3, r3
; CHECK: addic 4, 4, 5
; CHECK: addze 3, 3
; CHECK: blr
}
@ -26,8 +26,8 @@ entry:
%tmp.1 = add i64 %a, -5 ; <i64> [#uses=1]
ret i64 %tmp.1
; CHECK-LABEL: add_l_m5:
; CHECK: addic r4, r4, -5
; CHECK: addme r3, r3
; CHECK: addic 4, 4, -5
; CHECK: addme 3, 3
; CHECK: blr
}

View File

@ -1,6 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-linux-gnu | FileCheck %s -check-prefix=ELF
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin9 | FileCheck %s -check-prefix=DARWIN
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=DARWIN8
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
@a = global i1 true
; no alignment
@ -9,38 +7,24 @@
; no alignment
@c = global i16 2
;ELF: .p2align 1
;ELF: c:
;DARWIN: .p2align 1
;DARWIN: _c:
;CHECK: .p2align 1
;CHECK: c:
@d = global i32 3
;ELF: .p2align 2
;ELF: d:
;DARWIN: .p2align 2
;DARWIN: _d:
;CHECK: .p2align 2
;CHECK: d:
@e = global i64 4
;ELF: .p2align 3
;ELF: e
;DARWIN: .p2align 3
;DARWIN: _e:
;CHECK: .p2align 3
;CHECK: e
@f = global float 5.0
;ELF: .p2align 2
;ELF: f:
;DARWIN: .p2align 2
;DARWIN: _f:
;CHECK: .p2align 2
;CHECK: f:
@g = global double 6.0
;ELF: .p2align 3
;ELF: g:
;DARWIN: .p2align 3
;DARWIN: _g:
;CHECK: .p2align 3
;CHECK: g:
@bar = common global [75 x i8] zeroinitializer, align 128
;ELF: .comm bar,75,128
;DARWIN: .comm _bar,75,7
;; Darwin8 doesn't support aligned comm. Just miscompile this.
; DARWIN8: .comm _bar,75 ;
;CHECK: .comm bar,75,128

View File

@ -1,6 +1,4 @@
; RUN: llc -verify-machineinstrs -O0 -mcpu=ppc64 -mtriple=powerpc64-unknown-linux-gnu -fast-isel=false < %s | FileCheck %s
; RUN: llc -verify-machineinstrs -O0 -mcpu=g4 -mtriple=powerpc-apple-darwin8 < %s | FileCheck -check-prefix=DARWIN32 %s
; RUN: llc -verify-machineinstrs -O0 -mcpu=970 -mtriple=powerpc64-apple-darwin8 < %s | FileCheck -check-prefix=DARWIN64 %s
; Test case for PR 14779: anonymous aggregates are not handled correctly.
; Darwin bug report PR 15821 is similar.
@ -27,27 +25,6 @@ unequal:
; CHECK: ld 3, -[[OFFSET1]](1)
; CHECK: ld 3, -[[OFFSET2]](1)
; DARWIN32: _func1:
; DARWIN32: mr
; DARWIN32: mr r[[REG1:[0-9]+]], r[[REGA:[0-9]+]]
; DARWIN32: mr r[[REG2:[0-9]+]], r[[REGB:[0-9]+]]
; DARWIN32: cmplw {{(cr[0-9]+,)?}}r[[REGB]], r[[REGA]]
; DARWIN32: stw r[[REG1]], -[[OFFSET1:[0-9]+]]
; DARWIN32: stw r[[REG2]], -[[OFFSET2:[0-9]+]]
; DARWIN32: lwz r3, -[[OFFSET2]]
; DARWIN32: lwz r3, -[[OFFSET1]]
; DARWIN64: _func1:
; DARWIN64: mr
; DARWIN64: mr r[[REG1:[0-9]+]], r[[REGA:[0-9]+]]
; DARWIN64: mr r[[REG2:[0-9]+]], r[[REGB:[0-9]+]]
; DARWIN64: cmpld {{(cr[0-9]+,)?}}r[[REGB]], r[[REGA]]
; DARWIN64: std r[[REG1]], -[[OFFSET2:[0-9]+]]
; DARWIN64: std r[[REG2]], -[[OFFSET1:[0-9]+]]
; DARWIN64: ld r3, -[[OFFSET1]]
; DARWIN64: ld r3, -[[OFFSET2]]
define i8* @func2({ i64, i8* } %array1, %tarray* byval %array2) {
entry:
%array1_ptr = extractvalue {i64, i8* } %array1, 1
@ -69,29 +46,6 @@ unequal:
; CHECK: ld 3, -[[OFFSET2]](1)
; CHECK: ld 3, -[[OFFSET1]](1)
; DARWIN32-LABEL: _func2
; DARWIN32: mr
; DARWIN32: addi r[[REG8:[0-9]+]], r[[REGSP:[0-9]+]], 36
; DARWIN32: mr r[[REG7:[0-9]+]], r5
; DARWIN32: lwz r[[REG2:[0-9]+]], 44(r[[REGSP]])
; DARWIN32-DAG: cmplw {{(cr[0-9]+,)?}}r5, r[[REG2]]
; DARWIN32-DAG: stw r[[REG7]], -[[OFFSET1:[0-9]+]]
; DARWIN32-DAG: stw r[[REG2]], -[[OFFSET2:[0-9]+]]
; DARWIN32-DAG: lwz r3, -[[OFFSET1]]
; DARWIN32-DAG: lwz r3, -[[OFFSET2]]
; DARWIN64: _func2:
; DARWIN64: mr
; DARWIN64: mr r[[REG3:[0-9]+]], r[[REGA:[0-9]+]]
; DARWIN64: ld r[[REG2:[0-9]+]], 72(r1)
; DARWIN64: cmpld {{(cr[0-9]+,)?}}r[[REGA]], r[[REG2]]
; DARWIN64: std r[[REG2]], -[[OFFSET2:[0-9]+]]
; DARWIN64: std r[[REG3]], -[[OFFSET1:[0-9]+]]
; DARWIN64: ld r3, -[[OFFSET1]]
; DARWIN64: ld r3, -[[OFFSET2]]
define i8* @func3({ i64, i8* }* byval %array1, %tarray* byval %array2) {
entry:
%tmp1 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %array1, i32 0, i32 1
@ -113,29 +67,6 @@ unequal:
; CHECK: ld 3, -[[OFFSET2]](1)
; CHECK: ld 3, -[[OFFSET1]](1)
; DARWIN32-LABEL: _func3:
; DARWIN32-DAG: stw r[[REG8:[0-9]+]], 44(r[[REGSP:[0-9]+]])
; DARWIN32-DAG: stw r[[REG5:[0-9]+]], 32(r[[REGSP]])
; DARWIN32-DAG: addi r[[REG5a:[0-9]+]], r[[REGSP:[0-9]+]], 36
; DARWIN32-DAG: addi r[[REG8a:[0-9]+]], r[[REGSP]], 24
; DARWIN32-DAG: lwz r[[REG5a:[0-9]+]], 44(r[[REGSP]])
; DARWIN32-DAG: lwz r[[REG8a:[0-9]+]], 32(r[[REGSP]])
; DARWIN32-DAG: cmplw {{(cr[0-9]+,)?}}r[[REG8a]], r[[REG5a]]
; DARWIN32-DAG: stw r[[REG5a]], -[[OFFSET1:[0-9]+]]
; DARWIN32-DAG: stw r[[REG8a]], -[[OFFSET2:[0-9]+]]
; DARWIN32-DAG: lwz r3, -[[OFFSET1:[0-9]+]]
; DARWIN32-DAG: lwz r3, -[[OFFSET2:[0-9]+]]
; DARWIN64: _func3:
; DARWIN64-DAG: ld r[[REG3:[0-9]+]], 72(r1)
; DARWIN64-DAG: ld r[[REG4:[0-9]+]], 56(r1)
; DARWIN64: cmpld {{(cr[0-9]+,)?}}r[[REG4]], r[[REG3]]
; DARWIN64: std r[[REG4]], -[[OFFSET1:[0-9]+]]
; DARWIN64: std r[[REG3]], -[[OFFSET2:[0-9]+]]
; DARWIN64: ld r3, -[[OFFSET1]]
; DARWIN64: ld r3, -[[OFFSET2]]
define i8* @func4(i64 %p1, i64 %p2, i64 %p3, i64 %p4,
i64 %p5, i64 %p6, i64 %p7, i64 %p8,
{ i64, i8* } %array1, %tarray* byval %array2) {
@ -160,23 +91,3 @@ unequal:
; CHECK: ld 3, -[[OFFSET1]](1)
; CHECK: ld 3, -[[OFFSET2]](1)
; DARWIN32: _func4:
; DARWIN32: lwz r[[REG4:[0-9]+]], 96(r1)
; DARWIN32: addi r[[REG1:[0-9]+]], r1, 100
; DARWIN32: mr r[[REG2:[0-9]+]], r[[REG4]]
; DARWIN32: lwz r[[REG3:[0-9]+]], 108(r1)
; DARWIN32: cmplw {{(cr[0-9]+,)?}}r[[REG4]], r[[REG3]]
; DARWIN32-DAG: stw r[[REG2]], -[[OFFSET1:[0-9]+]]
; DARWIN32-DAG: stw r[[REG3]], -[[OFFSET2:[0-9]+]]
; DARWIN32: lwz r3, -[[OFFSET1]]
; DARWIN32: lwz r3, -[[OFFSET2]]
; DARWIN64: _func4:
; DARWIN64: ld r[[REG2:[0-9]+]], 120(r1)
; DARWIN64-DAG: ld r[[REG3:[0-9]+]], 136(r1)
; DARWIN64-DAG: mr r[[REG4:[0-9]+]], r[[REG2]]
; DARWIN64: cmpld {{(cr[0-9]+,)?}}r[[REG2]], r[[REG3]]
; DARWIN64: std r[[REG3]], -[[OFFSET2:[0-9]+]]
; DARWIN64: std r[[REG4]], -[[OFFSET1:[0-9]+]]
; DARWIN64: ld r3, -[[OFFSET1]]
; DARWIN64: ld r3, -[[OFFSET2]]

View File

@ -1,7 +1,7 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s
; This test verifies that we choose "assembler variant 1" (which GCC
; uses for "new-style mnemonics" as opposed to POWER mnemonics) when

View File

@ -1,10 +1,10 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
define i32 @exchange_and_add(i32* %mem, i32 %val) nounwind {
; CHECK-LABEL: exchange_and_add:
; CHECK: lwarx {{r[0-9]+}}, 0, {{r[0-9]+}}
; CHECK: lwarx {{[0-9]+}}, 0, {{[0-9]+}}
%tmp = atomicrmw add i32* %mem, i32 %val monotonic
; CHECK: stwcx. {{r[0-9]+}}, 0, {{r[0-9]+}}
; CHECK: stwcx. {{[0-9]+}}, 0, {{[0-9]+}}
ret i32 %tmp
}

View File

@ -1,6 +1,6 @@
; RUN: llc < %s -mtriple=powerpc-apple-darwin -verify-machineinstrs | FileCheck %s
; RUN: llc < %s -mtriple=powerpc64-apple-darwin -verify-machineinstrs | FileCheck %s
; RUN: llc < %s -mtriple=powerpc-apple-darwin -mcpu=440 | FileCheck %s --check-prefix=PPC440
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -verify-machineinstrs | FileCheck %s
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -verify-machineinstrs | FileCheck %s
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -mcpu=440 | FileCheck %s --check-prefix=PPC440
; Fences
define void @fence_acquire() {

View File

@ -1,7 +1,7 @@
; RUN: llc < %s -mtriple=powerpc-apple-darwin -verify-machineinstrs | FileCheck %s --check-prefix=CHECK --check-prefix=PPC32
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -verify-machineinstrs -ppc-asm-full-reg-names | FileCheck %s --check-prefix=CHECK --check-prefix=PPC32
; FIXME: -verify-machineinstrs currently fail on ppc64 (mismatched register/instruction).
; This is already checked for in Atomics-64.ll
; RUN: llc < %s -mtriple=powerpc64-apple-darwin | FileCheck %s --check-prefix=CHECK --check-prefix=PPC64
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -ppc-asm-full-reg-names | FileCheck %s --check-prefix=CHECK --check-prefix=PPC64
; In this file, we check that atomic load/store can make use of the indexed
; versions of the instructions.

View File

@ -1,7 +1,7 @@
; RUN: llc < %s -mtriple=powerpc-apple-darwin -verify-machineinstrs | FileCheck %s --check-prefix=CHECK --check-prefix=PPC32
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -verify-machineinstrs -ppc-asm-full-reg-names | FileCheck %s --check-prefix=CHECK --check-prefix=PPC32
; FIXME: -verify-machineinstrs currently fail on ppc64 (mismatched register/instruction).
; This is already checked for in Atomics-64.ll
; RUN: llc < %s -mtriple=powerpc64-apple-darwin | FileCheck %s --check-prefix=CHECK --check-prefix=PPC64
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -ppc-asm-full-reg-names | FileCheck %s --check-prefix=CHECK --check-prefix=PPC64
; FIXME: we don't currently check for the operations themselves with CHECK-NEXT,
; because they are implemented in a very messy way with lwarx/stwcx.

View File

@ -1,38 +1,40 @@
; RUN: llc -verify-machineinstrs < %s -relocation-model=static | FileCheck %s -check-prefix=STATIC
; RUN: llc -verify-machineinstrs < %s -relocation-model=pic -mtriple=powerpc-apple-darwin9 | FileCheck %s -check-prefix=PIC
; RUN: llc -verify-machineinstrs < %s -relocation-model=pic -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -check-prefix=PIC
; RUN: llc -verify-machineinstrs < %s -relocation-model=pic -mtriple=powerpc-unknown-linux | FileCheck %s -check-prefix=PICELF
; RUN: llc -verify-machineinstrs < %s -relocation-model=pic -mtriple=powerpc64-apple-darwin9 | FileCheck %s -check-prefix=PIC64
; RUN: llc -verify-machineinstrs < %s -relocation-model=dynamic-no-pic -mtriple=powerpc-apple-darwin9 | FileCheck %s -check-prefix=DYNAMIC
; RUN: llc -verify-machineinstrs < %s -relocation-model=dynamic-no-pic -mtriple=powerpc64-apple-darwin9 | FileCheck %s -check-prefix=DYNAMIC64
; RUN: llc -verify-machineinstrs < %s -relocation-model=pic -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=PIC64
;;; KB: These two tests currently cause an assertion. It seems as though we cannot have a non DSOLocal symbol with dynamic-no-pic.
;;; I need to ask Sean about this.
;;; RUN-NOT: llc -verify-machineinstrs < %s -relocation-model=dynamic-no-pic -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -check-prefix=DYNAMIC
;;; RUN-NOT: llc -verify-machineinstrs < %s -relocation-model=dynamic-no-pic -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=DYNAMIC64
; PR4482
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "powerpc-apple-darwin9"
target triple = "powerpc-unknown-linux-gnu"
define i32 @foo(i64 %x) nounwind {
entry:
; STATIC: _foo:
; STATIC: bl _exact_log2
; STATIC: foo:
; STATIC: bl exact_log2@PLT
; STATIC: blr
; STATIC: .subsections_via_symbols
; PIC: _foo:
; PIC: bl _exact_log2
; PIC: foo:
; PIC: bl exact_log2@PLT
; PIC: blr
; PICELF: foo:
; PICELF: bl exact_log2@PLT
; PICELF: blr
; PIC64: _foo:
; PIC64: bl _exact_log2
; PIC64: foo:
; PIC64: bl exact_log2
; PIC64: blr
; DYNAMIC: _foo:
; DYNAMIC: bl _exact_log2
; DYNAMIC: foo:
; DYNAMIC: bl exact_log2@PLT
; DYNAMIC: blr
; DYNAMIC64: _foo:
; DYNAMIC64: bl _exact_log2
; DYNAMIC64: foo:
; DYNAMIC64: bl exact_log2@PPLT
; DYNAMIC64: blr
%A = call i32 @exact_log2(i64 %x) nounwind
@ -45,7 +47,3 @@ entry:
}
; PIC: .subsections_via_symbols
; PIC64: .subsections_via_symbols

View File

@ -1,7 +1,7 @@
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
target datalayout = "E-p:32:32"
target triple = "powerpc-apple-darwin8.7.0"
target triple = "powerpc-unknown-linux-gnu"
;CHECK-LABEL: foo:
; There are 4 inner loops (%bb, %bb12, %bb25, %bb38) that all exit to %cond_next48
@ -11,10 +11,10 @@ target triple = "powerpc-apple-darwin8.7.0"
; One of the blocks ends up with a loop exit block that gets a tail-duplicated copy
; of %cond_next48, so there should only be two unconditional branches.
;CHECK: b LBB0_13
;CHECK: b LBB0_13
;CHECK-NOT: b LBB0_13
;CHECK: LBB0_13: ; %cond_next48
;CHECK: b .LBB0_13
;CHECK: b .LBB0_13
;CHECK-NOT: b .LBB0_13
;CHECK: .LBB0_13: # %cond_next48
define void @foo(i32 %W, i32 %X, i32 %Y, i32 %Z) {
entry:

View File

@ -1,6 +1,6 @@
; RUN: llc -verify-machineinstrs -mcpu=ppc64 < %s | FileCheck %s
; RUN: llc -verify-machineinstrs -mcpu=ppc64 -ppc-asm-full-reg-names < %s | FileCheck %s
target datalayout = "E-m:o-p:32:32-f64:32:64-n32"
target triple = "powerpc-apple-macosx10.5.0"
target triple = "powerpc-unknown-linux-gnu"
%struct.sm = type { i8, i8 }
@ -18,9 +18,9 @@ entry:
}
; CHECK-LABEL: @foo
; CHECK: stb {{r[0-9]+}}, [[OFF:[0-9]+]]({{r[3]?1}})
; CHECK: lhz r3, [[OFF]]({{r[3]?1}})
; CHECK: bl _bar
; CHECK: stb {{r[0-9]+}}, [[OFF:[0-9]+]]({{r[3?1]}})
; CHECK: lhz r4, [[OFF]]({{r[3?1]}})
; CHECK: bl bar
; CHECK: blr
declare void @bar(%struct.sm* byval, %struct.sm* byval)

View File

@ -1,24 +0,0 @@
; RUN: llc -verify-machineinstrs < %s -mtriple powerpc-apple-darwin8 | FileCheck %s
; Check that *coal* sections are emitted.
; CHECK: .section __TEXT,__textcoal_nt,coalesced,pure_instructions
; CHECK: .section __TEXT,__textcoal_nt,coalesced,pure_instructions
; CHECK-NEXT: .globl _foo
; CHECK: .section __TEXT,__const_coal,coalesced
; CHECK-NEXT: .globl _a
; CHECK: .section __DATA,__datacoal_nt,coalesced
; CHECK-NEXT: .globl _b
@a = weak_odr constant [4 x i32] [i32 1, i32 2, i32 3, i32 4], align 16
@b = weak global i32 5, align 4
@g = common global i32* null, align 8
; Function Attrs: nounwind ssp uwtable
define weak i32* @foo() {
entry:
store i32* getelementptr inbounds ([4 x i32], [4 x i32]* @a, i64 0, i64 0), i32** @g, align 8
ret i32* @b
}

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs -mcpu=g5 -mtriple=powerpc64-apple-darwin < %s | FileCheck %s
; RUN: llc -verify-machineinstrs -mcpu=g5 -mtriple=powerpc64-unknown-linux-gnu -ppc-asm-full-reg-names < %s | FileCheck %s
; Check that the peephole optimizer knows about sext and zext instructions.
; CHECK: test1sext
define i32 @test1sext(i64 %A, i64 %B, i32* %P, i64 *%P2) nounwind {

View File

@ -1,23 +0,0 @@
; RUN: llc -verify-machineinstrs -O0 -mcpu=g4 -mtriple=powerpc-apple-darwin8 < %s -debug -stop-after=machineverifier 2>&1 | FileCheck %s
; REQUIRES: asserts
define i64 @func1(i64 %p1, i64 %p2, i64 %p3, i64 %p4, { i64, i8* } %struct) {
; Verify that we get a combine on the build_pair, creating a LD8 load somewhere
; between "Initial selection DAG" and "Optimized lowered selection DAG".
; The target is big-endian, and stack grows towards higher addresses,
; so we expect the LD8 to load from the address used in the original HIBITS
; load.
; CHECK-LABEL: Initial selection DAG:
; CHECK-DAG: [[LOBITS:t[0-9]+]]: i32,ch = load<(load 4 from %fixed-stack.1)>
; CHECK-DAG: [[HIBITS:t[0-9]+]]: i32,ch = load<(load 4 from %fixed-stack.2)>
; CHECK: Combining: t{{[0-9]+}}: i64 = build_pair [[LOBITS]], [[HIBITS]]
; CHECK-NEXT: Creating new node
; CHECK-SAME: load<(load 8 from %fixed-stack.2, align 4)>
; CHECK-NEXT: into
; CHECK-SAME: load<(load 8 from %fixed-stack.2, align 4)>
; CHECK-LABEL: Optimized lowered selection DAG:
%result = extractvalue {i64, i8* } %struct, 0
ret i64 %result
}

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | not grep slwi
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | not grep slwi
define i32 @test(i32 %A, i32 %B) {
%C = sub i32 %B, %A

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | FileCheck %s
; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
define i32 @test(i32 %x) nounwind {
; CHECK-LABEL: @test

View File

@ -1,6 +1,6 @@
; RUN: llc -verify-machineinstrs < %s | grep 'foo bar":'
target datalayout = "E-p:32:32"
target triple = "powerpc-apple-darwin8.2.0"
target triple = "powerpc-unknown-linux-gnu.2.0"
@"foo bar" = global i32 4 ; <i32*> [#uses=0]

View File

@ -12,7 +12,8 @@
; ModuleID = 'debuginfo-stackarg.c'
source_filename = "debuginfo-stackarg.c"
target datalayout = "E-m:o-p:32:32-f64:32:64-n32"
target triple = "powerpc-apple-macosx10.5.0"
;;;target triple = "powerpc-apple-macosx10.5.0"
target triple = "powerpc-unknown-linux-gnu"
; Function Attrs: nounwind readnone ssp uwtable
define i64 @foo(i64 %bar1, i64 %bar2, i64 %bar3, i64 %bar4, i64 %bar5) local_unnamed_addr #0 !dbg !8 {
@ -24,8 +25,8 @@ define i64 @foo(i64 %bar1, i64 %bar2, i64 %bar3, i64 %bar4, i64 %bar5) local_unn
;
; Now check that we got two entries on the fixed stack with "expected" offsets.
; CHECK-LABEL: fixedStack:
; CHECK: id: 0, type: default, offset: 60, size: 4
; CHECK: id: 1, type: default, offset: 56, size: 4
; CHECK: id: 0, type: default, offset: 12, size: 4
; CHECK: id: 1, type: default, offset: 8, size: 4
; CHECK-NOT: id: 2
; CHECK-LABEL: stack:
;
@ -33,7 +34,7 @@ define i64 @foo(i64 %bar1, i64 %bar2, i64 %bar3, i64 %bar4, i64 %bar5) local_unn
; We expect to find a DBG_VALUE refering to the metadata id for bar5, using the lowest
; of the two fixed stack offsets found earlier.
; CHECK-LABEL: body:
; CHECK: DBG_VALUE debug-use $r1, 0, !17, !DIExpression(DW_OP_plus_uconst, 56)
; CHECK: DBG_VALUE debug-use $r1, 0, !17, !DIExpression(DW_OP_plus_uconst, 8)
entry:
tail call void @llvm.dbg.value(metadata i64 %bar1, metadata !13, metadata !DIExpression()), !dbg !18
tail call void @llvm.dbg.value(metadata i64 %bar2, metadata !14, metadata !DIExpression()), !dbg !19

View File

@ -1,5 +1,3 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin | FileCheck -check-prefix=CHECK-MACHO %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -disable-fp-elim | FileCheck -check-prefix=CHECK-MACHO %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-linux-gnu | FileCheck -check-prefix=LINUX-NO-FP %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-linux-gnu -disable-fp-elim | FileCheck -check-prefix=LINUX-FP %s
@ -8,13 +6,6 @@ entry:
unreachable
}
; MachO cannot handle an empty function.
; CHECK-MACHO: _func:
; CHECK-MACHO-NEXT: .cfi_startproc
; CHECK-MACHO-NEXT: {{^}};
; CHECK-MACHO-NEXT: nop
; CHECK-MACHO-NEXT: .cfi_endproc
; An empty function is perfectly fine on ELF.
; LINUX-NO-FP: func:
; LINUX-NO-FP-NEXT: {{^}}.L[[BEGIN:.*]]:{{$}}

View File

@ -1,8 +1,8 @@
; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-apple-darwin | FileCheck %s
; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names < %s -mattr=-vsx -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
define double @fabs(double %f) {
; CHECK-LABEL: fabs:
; CHECK: ; %bb.0:
; CHECK: # %bb.0:
; CHECK-NEXT: fabs f1, f1
; CHECK-NEXT: blr
;
@ -12,12 +12,13 @@ define double @fabs(double %f) {
define float @bitcast_fabs(float %x) {
; CHECK-LABEL: bitcast_fabs:
; CHECK: ; %bb.0:
; CHECK-NEXT: stfs f1, -8(r1)
; CHECK: lwz r2, -8(r1)
; CHECK-NEXT: clrlwi r2, r2, 1
; CHECK-NEXT: stw r2, -4(r1)
; CHECK-NEXT: lfs f1, -4(r1)
; CHECK: # %bb.0:
; CHECK: stfs f1, 8(r1)
; CHECK: lwz r3, 8(r1)
; CHECK-NEXT: clrlwi r3, r3, 1
; CHECK-NEXT: stw r3, 12(r1)
; CHECK-NEXT: lfs f1, 12(r1)
; CHECK-NEXT: addi r1, r1, 16
; CHECK-NEXT: blr
;
%bc1 = bitcast float %x to i32

View File

@ -1,14 +1,16 @@
; fsqrt should be generated when the fsqrt feature is enabled, but not
; otherwise.
; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-apple-darwin8 -mattr=+fsqrt | \
; RUN: grep "fsqrt f1, f1"
; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
; RUN: grep "fsqrt f1, f1"
; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-apple-darwin8 -mattr=-fsqrt | \
; RUN: not grep "fsqrt f1, f1"
; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-apple-darwin8 -mcpu=g4 | \
; RUN: not grep "fsqrt f1, f1"
; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-unknown-linux-gnu -mattr=+fsqrt | FileCheck %s -check-prefix=SQRT
; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-unknown-linux-gnu -mattr=-fsqrt | FileCheck %s -check-prefix=NSQRT
; SQRT: X:
; SQRT: fsqrt 1, 1
; SQRT: blr
; NSQRT: X:
; NSQRT-NOT: fsqrt 1, 1
; NSQRT: blr
declare double @llvm.sqrt.f64(double)

View File

@ -1,11 +1,11 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin9 | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
; CHECK: lis r2, ha16(L_x$non_lazy_ptr)
; CHECK: lis r3, ha16(L_y$non_lazy_ptr)
; CHECK: lwz r2, lo16(L_x$non_lazy_ptr)(r2)
; CHECK: lwz r3, lo16(L_y$non_lazy_ptr)(r3)
; CHECK: L_x$non_lazy_ptr:
; CHECK: L_y$non_lazy_ptr:
; CHECK: lis 3, x@ha
; CHECK: lis 4, y@ha
; CHECK: lwz 3, x@l(3)
; CHECK: lwz 4, y@l(4)
; CHECK: .hidden x
; CHECK: .hidden y
@x = external hidden global i32
@y = extern_weak hidden global i32

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin9 | not grep non_lazy_ptr
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | not grep non_lazy_ptr
@x = weak hidden global i32 0 ; <i32*> [#uses=1]

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs -mtriple=powerpc-apple-darwin < %s | FileCheck %s
; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu < %s | FileCheck %s
@a = external hidden global i32
@b = external global i32
@ -11,11 +11,10 @@ define i32* @get_b() {
ret i32* @b
}
; CHECK: .section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers
; CHECK-NEXT: .p2align 2
; CHECK-NEXT: L_a$non_lazy_ptr:
; CHECK-NEXT: .indirect_symbol _a
; CHECK-NEXT: .long 0
; CHECK-NEXT: L_b$non_lazy_ptr:
; CHECK-NEXT: .indirect_symbol _b
; CHECK-NEXT: .long 0
; CHECK: .globl get_a
; CHECK: .p2align 2
; CHECK: .type get_a,@function
; CHECK: .globl get_b
; CHECK: .p2align 2
; CHECK: .type get_b,@function
; CHECK: .hidden a

View File

@ -1,6 +1,6 @@
; RUN: llc < %s -relocation-model=pic -mtriple=powerpc-apple-darwin | FileCheck %s -check-prefix=PIC
; RUN: llc < %s -relocation-model=static -mtriple=powerpc-apple-darwin | FileCheck %s -check-prefix=STATIC
; RUN: llc < %s -relocation-model=pic -mtriple=powerpc64-apple-darwin | FileCheck %s -check-prefix=PPC64
; RUN: llc < %s -relocation-model=pic -mtriple=powerpc-unknown-linux-gnu -ppc-asm-full-reg-names | FileCheck %s -check-prefix=PIC
; RUN: llc < %s -relocation-model=static -mtriple=powerpc-unknown-linux-gnu -ppc-asm-full-reg-names | FileCheck %s -check-prefix=STATIC
; RUN: llc < %s -relocation-model=pic -mtriple=powerpc64-unknown-linux-gnu -ppc-asm-full-reg-names | FileCheck %s -check-prefix=PPC64
@nextaddr = global i8* null ; <i8**> [#uses=2]
@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]
@ -19,33 +19,33 @@ bb2: ; preds = %entry, %bb3
; PIC: mtctr
; PIC-NEXT: bctr
; PIC: li
; PIC: b LBB
; PIC: b .LBB
; PIC: li
; PIC: b LBB
; PIC: b .LBB
; PIC: li
; PIC: b LBB
; PIC: b .LBB
; PIC: li
; PIC: b LBB
; PIC: b .LBB
; STATIC: mtctr
; STATIC-NEXT: bctr
; STATIC: li
; STATIC: b LBB
; STATIC: b .LBB
; STATIC: li
; STATIC: b LBB
; STATIC: b .LBB
; STATIC: li
; STATIC: b LBB
; STATIC: b .LBB
; STATIC: li
; STATIC: b LBB
; STATIC: b .LBB
; PPC64: mtctr
; PPC64-NEXT: bctr
; PPC64: li
; PPC64: b LBB
; PPC64: b .LBB
; PPC64: li
; PPC64: b LBB
; PPC64: b .LBB
; PPC64: li
; PPC64: b LBB
; PPC64: b .LBB
; PPC64: li
; PPC64: b LBB
; PPC64: b .LBB
indirectbr i8* %gotovar.4.0, [label %L5, label %L4, label %L3, label %L2, label %L1]
bb3: ; preds = %entry
@ -71,13 +71,13 @@ L2: ; preds = %L3, %bb2
L1: ; preds = %L2, %bb2
%res.3 = phi i32 [ %phitmp, %L2 ], [ 2, %bb2 ] ; <i32> [#uses=1]
; PIC: li r[[R1:[0-9]+]], lo16(Ltmp0-L0$pb)
; PIC: addis r[[R0:[0-9]+]], r{{[0-9]+}}, ha16(Ltmp0-L0$pb)
; PIC: add r[[R2:[0-9]+]], r[[R0]], r[[R1]]
; PIC: stw r[[R2]]
; STATIC: li r[[R0:[0-9]+]], lo16(Ltmp0)
; STATIC: addis r[[R0]], r[[R0]], ha16(Ltmp0)
; STATIC: stw r[[R0]]
; PIC: lwz r[[R0:[0-9]+]], .LC0-.LTOC(r30)
; PIC-NEXT: lwz r[[R1:[0-9]+]], .LC2-.LTOC(r30)
; PIC-NEXT: stw r[[R1]], 0(r[[R0]])
; STATIC: li r[[R0:[0-9]+]], .Ltmp0@l
; STATIC-NEXT: lis r[[R1:[0-9]+]], nextaddr@ha
; STATIC-NEXT: addis r[[R0]], r[[R0]], .Ltmp0@ha
; STATIC-NEXT: stw r[[R0]], nextaddr@l(r[[R1]]
store i8* blockaddress(@foo, %L5), i8** @nextaddr, align 4
ret i32 %res.3
}

View File

@ -3,7 +3,7 @@
; RUN: grep __fixunstfti %t
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"
target triple = "powerpc64-apple-darwin9.2.0"
target triple = "powerpc64-unknown-linux-gnu.2.0"
define ppc_fp128 @foo(i128 %a) nounwind {
entry:

View File

@ -1,6 +1,8 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | \
; RUN: grep "srwi r3, r3, 31"
; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s
; CHECK-LABEL: test1
; CHECK: srwi r3, r3, 31
; CHECK: blr
define i32 @test1(i32 %X) {
entry:
icmp slt i32 %X, 0 ; <i1>:0 [#uses=1]

View File

@ -1,7 +1,7 @@
; RUN: llc -verify-machineinstrs < %s
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"
target triple = "powerpc64-apple-darwin9.2.0"
target triple = "powerpc64-unknown-linux-gnu.2.0"
define i128 @__fixunstfti(ppc_fp128 %a) nounwind {
entry:

View File

@ -1,6 +1,6 @@
; RUN: llc -verify-machineinstrs < %s
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc-apple-darwin8"
target triple = "powerpc-unknown-linux-gnu"
define double @SolveCubic(ppc_fp128 %X) {
entry:

View File

@ -8,7 +8,7 @@
; CHECK: %c1 = icmp ult i8* %scevgep, %inp2
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-n32"
target triple = "powerpc-apple-darwin9"
target triple = "powerpc-unknown-linux-gnu"
define void @foo(i8** %inp, i8* %inp2) nounwind {
entry:

View File

@ -1,7 +1,7 @@
; RUN: llc -verify-machineinstrs < %s
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"
target triple = "powerpc64-apple-darwin9.2.0"
target triple = "powerpc64-unknown-linux-gnu.2.0"
%struct.re_pattern_buffer = type <{ i8*, i64, i8, [7 x i8] }>
define i32 @xre_search_2(%struct.re_pattern_buffer* %bufp, i32 %range) nounwind {

View File

@ -1,4 +1,4 @@
; RUN: not llc < %s -mtriple=powerpc-apple-darwin 2>&1 | FileCheck %s
; RUN: not llc < %s -mtriple=powerpc-unknown-linux-gnu 2>&1 | FileCheck %s
; RUN: not llc < %s -mtriple=powerpc-unknown-linux-gnu 2>&1 | FileCheck %s
; RUN: not llc < %s -mtriple=powerpc64-unknown-linux-gnu 2>&1 | FileCheck %s

View File

@ -1,4 +1,3 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin 2>&1 | FileCheck %s --check-prefix=CHECK-DARWIN
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu 2>&1 | FileCheck %s
define i64 @get_reg() nounwind {
@ -6,11 +5,8 @@ entry:
%reg = call i64 @llvm.read_register.i64(metadata !0)
ret i64 %reg
; CHECK-LABEL: @get_reg
; CHECK-LABEL: get_reg
; CHECK: mr 3, 1
; CHECK-DARWIN-LABEL: @get_reg
; CHECK-DARWIN: mr r3, r1
}
declare i64 @llvm.read_register.i64(metadata) nounwind

View File

@ -1,5 +1,3 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin 2>&1 | FileCheck %s --check-prefix=CHECK-DARWIN
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin 2>&1 | FileCheck %s --check-prefix=CHECK-DARWIN
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu 2>&1 | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu 2>&1 | FileCheck %s
@ -11,8 +9,6 @@ entry:
; CHECK-LABEL: @get_reg
; CHECK: mr 3, 1
; CHECK-DARWIN-LABEL: @get_reg
; CHECK-DARWIN: mr r3, r1
}
declare i32 @llvm.read_register.i32(metadata) nounwind

View File

@ -1,4 +1,3 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin 2>&1 | FileCheck %s --check-prefix=CHECK-DARWIN
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu 2>&1 | FileCheck %s
define i64 @get_reg() nounwind {
@ -9,8 +8,6 @@ entry:
; CHECK-LABEL: @get_reg
; CHECK: mr 3, 13
; CHECK-DARWIN-LABEL: @get_reg
; CHECK-DARWIN: mr r3, r13
}
declare i64 @llvm.read_register.i64(metadata) nounwind

View File

@ -1,11 +1,8 @@
; RUN: not llc < %s -mtriple=powerpc-apple-darwin 2>&1 | FileCheck %s --check-prefix=CHECK-DARWIN
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu 2>&1 | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu 2>&1 | FileCheck %s
define i32 @get_reg() nounwind {
entry:
; FIXME: Include an allocatable-specific error message
; CHECK-DARWIN: Invalid register name global variable
%reg = call i32 @llvm.read_register.i32(metadata !0)
ret i32 %reg

View File

@ -1,4 +1,4 @@
; RUN: not llc < %s -mtriple=powerpc64-apple-darwin 2>&1 | FileCheck %s
; RUN: not llc < %s -mtriple=powerpc64-unknown-linux-gnu 2>&1 | FileCheck %s
; RUN: not llc < %s -mtriple=powerpc64-unknown-linux-gnu 2>&1 | FileCheck %s
define i64 @get_reg() nounwind {

View File

@ -1,4 +1,3 @@
; RUN: not llc < %s -mtriple=powerpc-apple-darwin 2>&1 | FileCheck %s --check-prefix=CHECK-NOTPPC32
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu 2>&1 | FileCheck %s
; RUN: not llc < %s -mtriple=powerpc64-unknown-linux-gnu 2>&1 | FileCheck %s --check-prefix=CHECK-NOTPPC32

View File

@ -1,7 +1,11 @@
; RUN: llc -verify-machineinstrs < %s | grep "no_dead_strip.*_X"
; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu < %s | FileCheck %s
; CHECK: .section .bss,"aw",@nobits
; CHECK: .weak X
; CHECK-LABEL: X:
; CHECK: .long 0
; CHECK: .size X, 4
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"
target triple = "powerpc-apple-darwin8.8.0"
@X = weak global i32 0 ; <i32*> [#uses=1]
@.str = internal constant [4 x i8] c"t.c\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1]
@llvm.used = appending global [1 x i8*] [ i8* bitcast (i32* @X to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0]

View File

@ -1,5 +1,5 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | not grep ori
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | not grep rlwimi
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | not grep ori
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | not grep rlwimi
define i32 @test1(i8* %P) {
%tmp.2.i = ptrtoint i8* %P to i32 ; <i32> [#uses=2]

Some files were not shown because too many files have changed in this diff Show More