Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp =================================================================== --- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -181,6 +181,9 @@ 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")) Index: llvm/test/Analysis/BasicAA/2006-11-03-BasicAAVectorCrash.ll =================================================================== --- llvm/test/Analysis/BasicAA/2006-11-03-BasicAAVectorCrash.ll +++ llvm/test/Analysis/BasicAA/2006-11-03-BasicAAVectorCrash.ll @@ -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: Index: llvm/test/CodeGen/PowerPC/2005-11-30-vastart-crash.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2005-11-30-vastart-crash.ll +++ llvm/test/CodeGen/PowerPC/2005-11-30-vastart-crash.ll @@ -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* ; [#uses=2] Index: llvm/test/CodeGen/PowerPC/2006-01-11-darwin-fp-argument.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2006-01-11-darwin-fp-argument.ll +++ llvm/test/CodeGen/PowerPC/2006-01-11-darwin-fp-argument.ll @@ -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 ; [#uses=1] ret double %tmp.2 } Index: llvm/test/CodeGen/PowerPC/2006-04-05-splat-ish.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2006-04-05-splat-ish.ll +++ llvm/test/CodeGen/PowerPC/2006-04-05-splat-ish.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/2006-09-28-shift_64.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2006-09-28-shift_64.ll +++ llvm/test/CodeGen/PowerPC/2006-09-28-shift_64.ll @@ -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: Index: llvm/test/CodeGen/PowerPC/2006-10-17-brcc-miscompile.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2006-10-17-brcc-miscompile.ll +++ llvm/test/CodeGen/PowerPC/2006-10-17-brcc-miscompile.ll @@ -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 ; [#uses=1] +; CHECK: xori 3, 3, 1 %tmp2 = xor i32 %tmp1, 1 ; [#uses=1] %tmp = icmp eq i32 %tmp2, 0 ; [#uses=1] br i1 %tmp, label %UnifiedReturnBlock, label %cond_true Index: llvm/test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll +++ llvm/test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll @@ -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 ; [#uses=2] %temp = alloca i32, align 4 ; [#uses=2] %ctz_x = alloca i32, align 4 ; [#uses=3] Index: llvm/test/CodeGen/PowerPC/2007-02-16-AlignPacked.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-02-16-AlignPacked.ll +++ llvm/test/CodeGen/PowerPC/2007-02-16-AlignPacked.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll +++ llvm/test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll @@ -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 ) ; [#uses=0] Index: llvm/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll +++ llvm/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll @@ -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) ) ; [#uses=0] ret i32 0 } Index: llvm/test/CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll +++ llvm/test/CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll @@ -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 } Index: llvm/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll +++ llvm/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll @@ -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; Index: llvm/test/CodeGen/PowerPC/2007-05-03-InlineAsm-S-Constraint.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-05-03-InlineAsm-S-Constraint.ll +++ llvm/test/CodeGen/PowerPC/2007-05-03-InlineAsm-S-Constraint.ll @@ -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() { Index: llvm/test/CodeGen/PowerPC/2007-05-14-InlineAsmSelectCrash.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-05-14-InlineAsmSelectCrash.ll +++ llvm/test/CodeGen/PowerPC/2007-05-14-InlineAsmSelectCrash.ll @@ -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 <{ }> Index: llvm/test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll +++ llvm/test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll @@ -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: Index: llvm/test/CodeGen/PowerPC/2007-05-30-dagcombine-miscomp.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-05-30-dagcombine-miscomp.ll +++ llvm/test/CodeGen/PowerPC/2007-05-30-dagcombine-miscomp.ll @@ -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 ; [#uses=1] Index: llvm/test/CodeGen/PowerPC/2007-09-08-unaligned.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-09-08-unaligned.ll +++ llvm/test/CodeGen/PowerPC/2007-09-08-unaligned.ll @@ -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 @@ @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 ; [#uses=1] @@ -31,6 +35,10 @@ ret i32 %retval6 } +; CHECK: main +; CHECK: lfs +; CHECK: lfd +; CHECK: blr define i32 @main() { entry: %retval = alloca i32, align 4 ; [#uses=1] Index: llvm/test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll +++ llvm/test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll @@ -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 ) ; [#uses=0] Index: llvm/test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert.ll +++ llvm/test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert.ll @@ -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] Index: llvm/test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert2.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert2.ll +++ llvm/test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert2.ll @@ -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] Index: llvm/test/CodeGen/PowerPC/2007-11-04-CoalescerCrash.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-11-04-CoalescerCrash.ll +++ llvm/test/CodeGen/PowerPC/2007-11-04-CoalescerCrash.ll @@ -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 }> Index: llvm/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll +++ llvm/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/2008-02-05-LiveIntervalsAssert.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-02-05-LiveIntervalsAssert.ll +++ llvm/test/CodeGen/PowerPC/2008-02-05-LiveIntervalsAssert.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll +++ llvm/test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll @@ -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 ; [#uses=2] Index: llvm/test/CodeGen/PowerPC/2008-03-05-RegScavengerAssert.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-03-05-RegScavengerAssert.ll +++ llvm/test/CodeGen/PowerPC/2008-03-05-RegScavengerAssert.ll @@ -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 ; [#uses=0] Index: llvm/test/CodeGen/PowerPC/2008-03-26-CoalescerBug.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-03-26-CoalescerBug.ll +++ llvm/test/CodeGen/PowerPC/2008-03-26-CoalescerBug.ll @@ -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 ; [#uses=1] Index: llvm/test/CodeGen/PowerPC/2008-04-10-LiveIntervalCrash.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-04-10-LiveIntervalCrash.ll +++ llvm/test/CodeGen/PowerPC/2008-04-10-LiveIntervalCrash.ll @@ -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 [ Index: llvm/test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll +++ llvm/test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/2008-04-23-CoalescerCrash.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-04-23-CoalescerCrash.ll +++ llvm/test/CodeGen/PowerPC/2008-04-23-CoalescerCrash.ll @@ -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 ; [#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 @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 Index: llvm/test/CodeGen/PowerPC/2008-05-01-ppc_fp128.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-05-01-ppc_fp128.ll +++ llvm/test/CodeGen/PowerPC/2008-05-01-ppc_fp128.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/2008-07-15-Bswap.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-07-15-Bswap.ll +++ llvm/test/CodeGen/PowerPC/2008-07-15-Bswap.ll @@ -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 @_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 ; :0 [#uses=1] Index: llvm/test/CodeGen/PowerPC/2008-07-15-Fabs.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-07-15-Fabs.ll +++ llvm/test/CodeGen/PowerPC/2008-07-15-Fabs.ll @@ -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 ; :0 [#uses=1] Index: llvm/test/CodeGen/PowerPC/2008-07-15-SignExtendInreg.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-07-15-SignExtendInreg.ll +++ llvm/test/CodeGen/PowerPC/2008-07-15-SignExtendInreg.ll @@ -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 ; :0 [#uses=2] Index: llvm/test/CodeGen/PowerPC/2008-07-17-Fneg.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-07-17-Fneg.ll +++ llvm/test/CodeGen/PowerPC/2008-07-17-Fneg.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/2008-07-24-PPC64-CCBug.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-07-24-PPC64-CCBug.ll +++ llvm/test/CodeGen/PowerPC/2008-07-24-PPC64-CCBug.ll @@ -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 ; :0 [#uses=0] Index: llvm/test/CodeGen/PowerPC/2008-09-12-CoalescerBug.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-09-12-CoalescerBug.ll +++ llvm/test/CodeGen/PowerPC/2008-09-12-CoalescerBug.ll @@ -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 ; [#uses=1] Index: llvm/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll +++ llvm/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll @@ -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 ; [#uses=0] Index: llvm/test/CodeGen/PowerPC/2008-10-31-PPCF128Libcalls.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-10-31-PPCF128Libcalls.ll +++ llvm/test/CodeGen/PowerPC/2008-10-31-PPCF128Libcalls.ll @@ -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 ; [#uses=2] @b = common global ppc_fp128 0xM00000000000000000000000000000000, align 16 ; [#uses=2] @c = common global ppc_fp128 0xM00000000000000000000000000000000, align 16 ; [#uses=3] Index: llvm/test/CodeGen/PowerPC/2008-12-02-LegalizeTypeAssert.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2008-12-02-LegalizeTypeAssert.ll +++ llvm/test/CodeGen/PowerPC/2008-12-02-LegalizeTypeAssert.ll @@ -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: Index: llvm/test/CodeGen/PowerPC/2009-01-16-DeclareISelBug.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2009-01-16-DeclareISelBug.ll +++ llvm/test/CodeGen/PowerPC/2009-01-16-DeclareISelBug.ll @@ -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] Index: llvm/test/CodeGen/PowerPC/2009-03-17-LSRBug.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2009-03-17-LSRBug.ll +++ llvm/test/CodeGen/PowerPC/2009-03-17-LSRBug.ll @@ -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 { Index: llvm/test/CodeGen/PowerPC/2009-05-28-LegalizeBRCC.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2009-05-28-LegalizeBRCC.ll +++ llvm/test/CodeGen/PowerPC/2009-05-28-LegalizeBRCC.ll @@ -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 { Index: llvm/test/CodeGen/PowerPC/2009-08-17-inline-asm-addr-mode-breakage.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2009-08-17-inline-asm-addr-mode-breakage.ll +++ llvm/test/CodeGen/PowerPC/2009-08-17-inline-asm-addr-mode-breakage.ll @@ -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 = '' 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 @@ 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 ; [#uses=2] %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] store i32 %y, i32* %y_addr Index: llvm/test/CodeGen/PowerPC/2009-09-18-carrybit.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2009-09-18-carrybit.ll +++ llvm/test/CodeGen/PowerPC/2009-09-18-carrybit.ll @@ -1,7 +1,7 @@ ; RUN: llc -verify-machineinstrs < %s | FileCheck %s ; ModuleID = '' 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: Index: llvm/test/CodeGen/PowerPC/2009-11-15-ProcImpDefsBug.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2009-11-15-ProcImpDefsBug.ll +++ llvm/test/CodeGen/PowerPC/2009-11-15-ProcImpDefsBug.ll @@ -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: Index: llvm/test/CodeGen/PowerPC/2009-11-25-ImpDefBug.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2009-11-25-ImpDefBug.ll +++ llvm/test/CodeGen/PowerPC/2009-11-25-ImpDefBug.ll @@ -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 } Index: llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll +++ llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll @@ -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 ; %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 Index: llvm/test/CodeGen/PowerPC/2010-02-12-saveCR.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2010-02-12-saveCR.ll +++ llvm/test/CodeGen/PowerPC/2010-02-12-saveCR.ll @@ -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 ; [#uses=0] %x1 = bitcast [100000 x i8]* %x to i8* ; [#uses=1] @@ -25,16 +20,10 @@ 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 } Index: llvm/test/CodeGen/PowerPC/2010-03-09-indirect-call.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2010-03-09-indirect-call.ll +++ llvm/test/CodeGen/PowerPC/2010-03-09-indirect-call.ll @@ -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 (...)* ; [#uses=1] define void @foo() nounwind ssp { entry: -; CHECK: mtctr r12 +; CHECK: mtctr 3 ; CHECK: bctrl %0 = load void (...)*, void (...)** @p, align 4 ; [#uses=1] call void (...) %0() nounwind Index: llvm/test/CodeGen/PowerPC/2010-04-01-MachineCSEBug.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2010-04-01-MachineCSEBug.ll +++ llvm/test/CodeGen/PowerPC/2010-04-01-MachineCSEBug.ll @@ -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 } Index: llvm/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll +++ llvm/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll @@ -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) ; [#uses=1] ret i8* %0 } @@ -15,11 +15,11 @@ 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) ; [#uses=1] ret i8* %0 } Index: llvm/test/CodeGen/PowerPC/2010-12-18-PPCStackRefs.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2010-12-18-PPCStackRefs.ll +++ llvm/test/CodeGen/PowerPC/2010-12-18-PPCStackRefs.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/2011-12-05-NoSpillDupCR.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2011-12-05-NoSpillDupCR.ll +++ llvm/test/CodeGen/PowerPC/2011-12-05-NoSpillDupCR.ll @@ -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' Index: llvm/test/CodeGen/PowerPC/2011-12-06-SpillAndRestoreCR.ll =================================================================== --- llvm/test/CodeGen/PowerPC/2011-12-06-SpillAndRestoreCR.ll +++ llvm/test/CodeGen/PowerPC/2011-12-06-SpillAndRestoreCR.ll @@ -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' Index: llvm/test/CodeGen/PowerPC/Atomics-64.ll =================================================================== --- llvm/test/CodeGen/PowerPC/Atomics-64.ll +++ llvm/test/CodeGen/PowerPC/Atomics-64.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/Frames-alloca.ll =================================================================== --- llvm/test/CodeGen/PowerPC/Frames-alloca.ll +++ llvm/test/CodeGen/PowerPC/Frames-alloca.ll @@ -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 ; [#uses=1] Index: llvm/test/CodeGen/PowerPC/Frames-large.ll =================================================================== --- llvm/test/CodeGen/PowerPC/Frames-large.ll +++ llvm/test/CodeGen/PowerPC/Frames-large.ll @@ -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 ; [#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-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 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 +; 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 + +; 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-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 Index: llvm/test/CodeGen/PowerPC/Frames-small.ll =================================================================== --- llvm/test/CodeGen/PowerPC/Frames-small.ll +++ llvm/test/CodeGen/PowerPC/Frames-small.ll @@ -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 ; [#uses=1] Index: llvm/test/CodeGen/PowerPC/LargeAbsoluteAddr.ll =================================================================== --- llvm/test/CodeGen/PowerPC/LargeAbsoluteAddr.ll +++ llvm/test/CodeGen/PowerPC/LargeAbsoluteAddr.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/addc.ll =================================================================== --- llvm/test/CodeGen/PowerPC/addc.ll +++ llvm/test/CodeGen/PowerPC/addc.ll @@ -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 ; [#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 @@ %tmp.1 = add i64 %a, 5 ; [#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 @@ %tmp.1 = add i64 %a, -5 ; [#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 } Index: llvm/test/CodeGen/PowerPC/align.ll =================================================================== --- llvm/test/CodeGen/PowerPC/align.ll +++ llvm/test/CodeGen/PowerPC/align.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/anon_aggr.ll =================================================================== --- llvm/test/CodeGen/PowerPC/anon_aggr.ll +++ llvm/test/CodeGen/PowerPC/anon_aggr.ll @@ -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 @@ ; 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 @@ ; 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 @@ ; 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 @@ ; 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]] Index: llvm/test/CodeGen/PowerPC/asm-dialect.ll =================================================================== --- llvm/test/CodeGen/PowerPC/asm-dialect.ll +++ llvm/test/CodeGen/PowerPC/asm-dialect.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/atomic-1.ll =================================================================== --- llvm/test/CodeGen/PowerPC/atomic-1.ll +++ llvm/test/CodeGen/PowerPC/atomic-1.ll @@ -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 } Index: llvm/test/CodeGen/PowerPC/atomics-fences.ll =================================================================== --- llvm/test/CodeGen/PowerPC/atomics-fences.ll +++ llvm/test/CodeGen/PowerPC/atomics-fences.ll @@ -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() { Index: llvm/test/CodeGen/PowerPC/atomics-indexed.ll =================================================================== --- llvm/test/CodeGen/PowerPC/atomics-indexed.ll +++ llvm/test/CodeGen/PowerPC/atomics-indexed.ll @@ -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. Index: llvm/test/CodeGen/PowerPC/atomics.ll =================================================================== --- llvm/test/CodeGen/PowerPC/atomics.ll +++ llvm/test/CodeGen/PowerPC/atomics.ll @@ -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. Index: llvm/test/CodeGen/PowerPC/available-externally.ll =================================================================== --- llvm/test/CodeGen/PowerPC/available-externally.ll +++ llvm/test/CodeGen/PowerPC/available-externally.ll @@ -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 @@ } -; PIC: .subsections_via_symbols - - -; PIC64: .subsections_via_symbols Index: llvm/test/CodeGen/PowerPC/branch-opt.ll =================================================================== --- llvm/test/CodeGen/PowerPC/branch-opt.ll +++ llvm/test/CodeGen/PowerPC/branch-opt.ll @@ -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 @@ ; 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: Index: llvm/test/CodeGen/PowerPC/byval-aliased.ll =================================================================== --- llvm/test/CodeGen/PowerPC/byval-aliased.ll +++ llvm/test/CodeGen/PowerPC/byval-aliased.ll @@ -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 @@ } ; 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) Index: llvm/test/CodeGen/PowerPC/coal-sections.ll =================================================================== --- llvm/test/CodeGen/PowerPC/coal-sections.ll +++ /dev/null @@ -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 -} Index: llvm/test/CodeGen/PowerPC/coalesce-ext.ll =================================================================== --- llvm/test/CodeGen/PowerPC/coalesce-ext.ll +++ llvm/test/CodeGen/PowerPC/coalesce-ext.ll @@ -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 { Index: llvm/test/CodeGen/PowerPC/combine_loads_from_build_pair.ll =================================================================== --- llvm/test/CodeGen/PowerPC/combine_loads_from_build_pair.ll +++ /dev/null @@ -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 -} - Index: llvm/test/CodeGen/PowerPC/compare-duplicate.ll =================================================================== --- llvm/test/CodeGen/PowerPC/compare-duplicate.ll +++ llvm/test/CodeGen/PowerPC/compare-duplicate.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/compare-simm.ll =================================================================== --- llvm/test/CodeGen/PowerPC/compare-simm.ll +++ llvm/test/CodeGen/PowerPC/compare-simm.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/darwin-labels.ll =================================================================== --- llvm/test/CodeGen/PowerPC/darwin-labels.ll +++ llvm/test/CodeGen/PowerPC/darwin-labels.ll @@ -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 ; [#uses=0] Index: llvm/test/CodeGen/PowerPC/debuginfo-stackarg.ll =================================================================== --- llvm/test/CodeGen/PowerPC/debuginfo-stackarg.ll +++ llvm/test/CodeGen/PowerPC/debuginfo-stackarg.ll @@ -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 @@ ; ; 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 @@ ; 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 Index: llvm/test/CodeGen/PowerPC/empty-functions.ll =================================================================== --- llvm/test/CodeGen/PowerPC/empty-functions.ll +++ llvm/test/CodeGen/PowerPC/empty-functions.ll @@ -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 @@ 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:.*]]:{{$}} Index: llvm/test/CodeGen/PowerPC/fabs.ll =================================================================== --- llvm/test/CodeGen/PowerPC/fabs.ll +++ llvm/test/CodeGen/PowerPC/fabs.ll @@ -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 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 Index: llvm/test/CodeGen/PowerPC/fsqrt.ll =================================================================== --- llvm/test/CodeGen/PowerPC/fsqrt.ll +++ llvm/test/CodeGen/PowerPC/fsqrt.ll @@ -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) Index: llvm/test/CodeGen/PowerPC/hidden-vis-2.ll =================================================================== --- llvm/test/CodeGen/PowerPC/hidden-vis-2.ll +++ llvm/test/CodeGen/PowerPC/hidden-vis-2.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/hidden-vis.ll =================================================================== --- llvm/test/CodeGen/PowerPC/hidden-vis.ll +++ llvm/test/CodeGen/PowerPC/hidden-vis.ll @@ -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 ; [#uses=1] Index: llvm/test/CodeGen/PowerPC/indirect-hidden.ll =================================================================== --- llvm/test/CodeGen/PowerPC/indirect-hidden.ll +++ llvm/test/CodeGen/PowerPC/indirect-hidden.ll @@ -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 @@ 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 Index: llvm/test/CodeGen/PowerPC/indirectbr.ll =================================================================== --- llvm/test/CodeGen/PowerPC/indirectbr.ll +++ llvm/test/CodeGen/PowerPC/indirectbr.ll @@ -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 ; [#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 @@ ; 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 @@ L1: ; preds = %L2, %bb2 %res.3 = phi i32 [ %phitmp, %L2 ], [ 2, %bb2 ] ; [#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 } Index: llvm/test/CodeGen/PowerPC/int-fp-conv-0.ll =================================================================== --- llvm/test/CodeGen/PowerPC/int-fp-conv-0.ll +++ llvm/test/CodeGen/PowerPC/int-fp-conv-0.ll @@ -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: Index: llvm/test/CodeGen/PowerPC/ispositive.ll =================================================================== --- llvm/test/CodeGen/PowerPC/ispositive.ll +++ llvm/test/CodeGen/PowerPC/ispositive.ll @@ -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 ; :0 [#uses=1] Index: llvm/test/CodeGen/PowerPC/itofp128.ll =================================================================== --- llvm/test/CodeGen/PowerPC/itofp128.ll +++ llvm/test/CodeGen/PowerPC/itofp128.ll @@ -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: Index: llvm/test/CodeGen/PowerPC/longdbl-truncate.ll =================================================================== --- llvm/test/CodeGen/PowerPC/longdbl-truncate.ll +++ llvm/test/CodeGen/PowerPC/longdbl-truncate.ll @@ -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: Index: llvm/test/CodeGen/PowerPC/lsr-postinc-pos.ll =================================================================== --- llvm/test/CodeGen/PowerPC/lsr-postinc-pos.ll +++ llvm/test/CodeGen/PowerPC/lsr-postinc-pos.ll @@ -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: Index: llvm/test/CodeGen/PowerPC/mask64.ll =================================================================== --- llvm/test/CodeGen/PowerPC/mask64.ll +++ llvm/test/CodeGen/PowerPC/mask64.ll @@ -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 { Index: llvm/test/CodeGen/PowerPC/named-reg-alloc-r0.ll =================================================================== --- llvm/test/CodeGen/PowerPC/named-reg-alloc-r0.ll +++ llvm/test/CodeGen/PowerPC/named-reg-alloc-r0.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/named-reg-alloc-r1-64.ll =================================================================== --- llvm/test/CodeGen/PowerPC/named-reg-alloc-r1-64.ll +++ llvm/test/CodeGen/PowerPC/named-reg-alloc-r1-64.ll @@ -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 @@ %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 Index: llvm/test/CodeGen/PowerPC/named-reg-alloc-r1.ll =================================================================== --- llvm/test/CodeGen/PowerPC/named-reg-alloc-r1.ll +++ llvm/test/CodeGen/PowerPC/named-reg-alloc-r1.ll @@ -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 @@ ; 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 Index: llvm/test/CodeGen/PowerPC/named-reg-alloc-r13-64.ll =================================================================== --- llvm/test/CodeGen/PowerPC/named-reg-alloc-r13-64.ll +++ llvm/test/CodeGen/PowerPC/named-reg-alloc-r13-64.ll @@ -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 @@ ; 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 Index: llvm/test/CodeGen/PowerPC/named-reg-alloc-r13.ll =================================================================== --- llvm/test/CodeGen/PowerPC/named-reg-alloc-r13.ll +++ llvm/test/CodeGen/PowerPC/named-reg-alloc-r13.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/named-reg-alloc-r2-64.ll =================================================================== --- llvm/test/CodeGen/PowerPC/named-reg-alloc-r2-64.ll +++ llvm/test/CodeGen/PowerPC/named-reg-alloc-r2-64.ll @@ -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 { Index: llvm/test/CodeGen/PowerPC/named-reg-alloc-r2.ll =================================================================== --- llvm/test/CodeGen/PowerPC/named-reg-alloc-r2.ll +++ llvm/test/CodeGen/PowerPC/named-reg-alloc-r2.ll @@ -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 Index: llvm/test/CodeGen/PowerPC/no-dead-strip.ll =================================================================== --- llvm/test/CodeGen/PowerPC/no-dead-strip.ll +++ llvm/test/CodeGen/PowerPC/no-dead-strip.ll @@ -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 ; [#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] Index: llvm/test/CodeGen/PowerPC/or-addressing-mode.ll =================================================================== --- llvm/test/CodeGen/PowerPC/or-addressing-mode.ll +++ llvm/test/CodeGen/PowerPC/or-addressing-mode.ll @@ -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 ; [#uses=2] Index: llvm/test/CodeGen/PowerPC/ppc-prologue.ll =================================================================== --- llvm/test/CodeGen/PowerPC/ppc-prologue.ll +++ llvm/test/CodeGen/PowerPC/ppc-prologue.ll @@ -1,11 +1,11 @@ -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s +; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -disable-fp-elim | FileCheck %s define i32 @_Z4funci(i32 %a) ssp { -; CHECK: mflr r0 -; CHECK-NEXT: stw r31, -4(r1) -; CHECK-NEXT: stw r0, 8(r1) -; CHECK-NEXT: stwu r1, -80(r1) -; CHECK: mr r31, r1 +; CHECK: mflr 0 +; CHECK-NEXT: stw 0, 4(1) +; CHECK-NEXT: stwu 1, -32(1) +; CHECK-NEXT: stw 31, 28(1) +; CHECK: mr 31, 1 entry: %a_addr = alloca i32 ; [#uses=2] %retval = alloca i32 ; [#uses=2] Index: llvm/test/CodeGen/PowerPC/ppc32-i1-vaarg.ll =================================================================== --- llvm/test/CodeGen/PowerPC/ppc32-i1-vaarg.ll +++ llvm/test/CodeGen/PowerPC/ppc32-i1-vaarg.ll @@ -1,5 +1,4 @@ ; RUN: llc -verify-machineinstrs < %s -mcpu=ppc32 | FileCheck %s -; RUN: llc -verify-machineinstrs < %s -mcpu=ppc32 -mtriple=powerpc-darwin9 | FileCheck %s -check-prefix=CHECK-D target triple = "powerpc-unknown-linux-gnu" declare void @printf(i8*, ...) @@ -14,7 +13,4 @@ ; CHECK-DAG: crxor 6, 6, 6 ; CHECK: bl printf -; CHECK-D-LABEL: @main -; CHECK-D: li r4, 0 -; CHECK-D: bl _printf Index: llvm/test/CodeGen/PowerPC/ppcf128-1-opt.ll =================================================================== --- llvm/test/CodeGen/PowerPC/ppcf128-1-opt.ll +++ llvm/test/CodeGen/PowerPC/ppcf128-1-opt.ll @@ -1,7 +1,7 @@ ; RUN: llc -verify-machineinstrs < %s > %t ; ModuleID = '' 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 ppc_fp128 @plus(ppc_fp128 %x, ppc_fp128 %y) { entry: Index: llvm/test/CodeGen/PowerPC/ppcf128-1.ll =================================================================== --- llvm/test/CodeGen/PowerPC/ppcf128-1.ll +++ llvm/test/CodeGen/PowerPC/ppcf128-1.ll @@ -1,7 +1,7 @@ ; RUN: opt < %s -O3 | llc > %t ; ModuleID = 'ld3.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" define ppc_fp128 @plus(ppc_fp128 %x, ppc_fp128 %y) { entry: Index: llvm/test/CodeGen/PowerPC/private.ll =================================================================== --- llvm/test/CodeGen/PowerPC/private.ll +++ llvm/test/CodeGen/PowerPC/private.ll @@ -1,28 +1,20 @@ ; Test to make sure that the 'private' is used correctly. ; -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | \ -; RUN: FileCheck --check-prefix=LINUX %s -; -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin | \ -; RUN: FileCheck --check-prefix=OSX %s +; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -; LINUX: .Lfoo: -; OSX: l_foo: +; CHECK: .Lfoo: define private void @foo() nounwind { ret void } define i32 @bar() nounwind { -; LINUX: bl{{.*}}.Lfoo -; OSX: bl{{.*}}l_foo +; CHECK: bl{{.*}}.Lfoo call void @foo() -; LINUX: lis{{.*}}.Lbaz -; OSX: lis{{.*}}l_baz +; CHECK: lis{{.*}}.Lbaz %1 = load i32, i32* @baz, align 4 ret i32 %1 } -; LINUX: .Lbaz: -; OSX: l_baz: +; CHECK: .Lbaz: @baz = private global i32 4 Index: llvm/test/CodeGen/PowerPC/retaddr.ll =================================================================== --- llvm/test/CodeGen/PowerPC/retaddr.ll +++ llvm/test/CodeGen/PowerPC/retaddr.ll @@ -1,6 +1,27 @@ -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | grep mflr -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | grep lwz -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin8 | grep "ld r., 16(r1)" +; 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: foo +; PPC32: mflr 0 +; PPC32: stw 0, 4(1) +; PPC32: stwu 1, -[[STACK:[0-9]+]](1) +; PPC32: lwz [[REG:[0-9]+]], [[RETADDR:[0-9]+]](1) +; PPC32: stw [[REG]], 0(3) +; PPC32: lwz 0, [[RETADDR]](1) +; PPC32: addi 1, 1, [[STACK]] +; PPC32: mtlr 0 +; PPC32: blr + +; PPC64: foo +; PPC64: mflr 0 +; PPC64: std 0, [[RETADDR:[0-9]+]] +; PPC64: stdu 1, -[[STACK:[0-9]+]] +; PPC64: ld [[REG:[0-9]+]] +; PPC64: std [[REG]], 0(3) +; PPC64: addi 1, 1, [[STACK]] +; PPC64: ld 0, [[RETADDR]] +; PPC64: mtlr 0 +; PPC64: blr define void @foo(i8** %X) nounwind { entry: Index: llvm/test/CodeGen/PowerPC/rlwimi-keep-rsh.ll =================================================================== --- llvm/test/CodeGen/PowerPC/rlwimi-keep-rsh.ll +++ llvm/test/CodeGen/PowerPC/rlwimi-keep-rsh.ll @@ -1,11 +1,11 @@ -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin | FileCheck %s +; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s ; Formerly dropped the RHS of %tmp6 when constructing rlwimi. ; 7346117 @foo = external global i32 define void @xxx(i32 %a, i32 %b, i32 %c, i32 %d) nounwind optsize { -; CHECK: _xxx: +; CHECK: xxx: ; CHECK: or ; CHECK: and ; CHECK: rlwimi Index: llvm/test/CodeGen/PowerPC/seteq-0.ll =================================================================== --- llvm/test/CodeGen/PowerPC/seteq-0.ll +++ llvm/test/CodeGen/PowerPC/seteq-0.ll @@ -1,12 +1,12 @@ -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 | FileCheck %s +; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s define i32 @eq0(i32 %a) { %tmp.1 = icmp eq i32 %a, 0 ; [#uses=1] %tmp.2 = zext i1 %tmp.1 to i32 ; [#uses=1] ret i32 %tmp.2 -; CHECK: cntlzw [[REG:r[0-9]+]], r3 -; CHECK: rlwinm r3, [[REG]], 27, 31, 31 +; CHECK: cntlzw [[REG:[0-9]+]], 3 +; CHECK: rlwinm 3, [[REG]], 27, 31, 31 ; CHECK: blr } Index: llvm/test/CodeGen/PowerPC/stack-protector.ll =================================================================== --- llvm/test/CodeGen/PowerPC/stack-protector.ll +++ llvm/test/CodeGen/PowerPC/stack-protector.ll @@ -1,15 +1,10 @@ -; RUN: llc -verify-machineinstrs -mtriple=powerpc-apple-darwin8 < %s | FileCheck -check-prefix=DARWIN32 %s -; RUN: llc -verify-machineinstrs -mtriple=powerpc64-apple-darwin < %s | FileCheck -check-prefix=DARWIN64 %s -; RUN: llc -verify-machineinstrs -mtriple=ppc32-unknown-linux < %s | FileCheck -check-prefix=LINUX32 %s +; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux < %s | FileCheck -check-prefix=LINUX32 %s +; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux < %s | FileCheck -check-prefix=LINUX64 %s ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux < %s | FileCheck -check-prefix=LINUX64 %s -; DARWIN32: __stack_chk_guard -; DARWIN64: __stack_chk_guard ; LINUX32: lwz {{[0-9]+}}, -28680(2) ; LINUX64: ld {{[0-9]+}}, -28688(13) -; DARWIN32: __stack_chk_fail -; DARWIN64: __stack_chk_fail ; LINUX32: __stack_chk_fail ; LINUX64: __stack_chk_fail Index: llvm/test/CodeGen/PowerPC/stfiwx.ll =================================================================== --- llvm/test/CodeGen/PowerPC/stfiwx.ll +++ llvm/test/CodeGen/PowerPC/stfiwx.ll @@ -1,5 +1,5 @@ -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 -mattr=stfiwx | FileCheck %s -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx | FileCheck -check-prefix=CHECK-LS %s +; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -mattr=stfiwx | FileCheck %s +; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -mattr=-stfiwx | FileCheck -check-prefix=CHECK-LS %s define void @test1(float %a, i32* %b) nounwind { ; CHECK-LABEL: @test1 @@ -8,6 +8,7 @@ store i32 %tmp.2, i32* %b ret void +; CHECK: stwu ; CHECK-NOT: lwz ; CHECK-NOT: stw ; CHECK: stfiwx @@ -30,6 +31,7 @@ store i32 %tmp.7, i32* %b ret void +; CHECK: stwu ; CHECK-NOT: lwz ; CHECK-NOT: stw ; CHECK: stfiwx @@ -40,4 +42,3 @@ ; CHECK-LS-NOT: stfiwx ; CHECK-LS: blr } - Index: llvm/test/CodeGen/PowerPC/stubs.ll =================================================================== --- llvm/test/CodeGen/PowerPC/stubs.ll +++ llvm/test/CodeGen/PowerPC/stubs.ll @@ -1,9 +1,9 @@ -; RUN: llc -verify-machineinstrs %s -o - -mtriple=powerpc-apple-darwin9 | FileCheck %s +; RUN: llc -verify-machineinstrs %s -o - -mtriple=powerpc-unknown-linux-gnu | FileCheck %s define ppc_fp128 @test1(i64 %X) nounwind readnone { entry: %0 = sitofp i64 %X to ppc_fp128 ret ppc_fp128 %0 } -; CHECK: _test1: -; CHECK: bl ___floatditf +; CHECK: test1: +; CHECK: bl __floatditf@PLT Index: llvm/test/CodeGen/PowerPC/tailcallpic1.ll =================================================================== --- llvm/test/CodeGen/PowerPC/tailcallpic1.ll +++ llvm/test/CodeGen/PowerPC/tailcallpic1.ll @@ -1,4 +1,4 @@ -; RUN: llc -verify-machineinstrs < %s -tailcallopt -mtriple=powerpc-apple-darwin -relocation-model=pic | grep TC_RETURN +; RUN: llc -verify-machineinstrs < %s -tailcallopt -mtriple=powerpc-unknown-linux-gnu -relocation-model=pic | grep TC_RETURN Index: llvm/test/CodeGen/PowerPC/varargs.ll =================================================================== --- llvm/test/CodeGen/PowerPC/varargs.ll +++ llvm/test/CodeGen/PowerPC/varargs.ll @@ -1,5 +1,6 @@ -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin | FileCheck -check-prefix=P32 %s -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin | FileCheck -check-prefix=P64 %s +; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck -check-prefix=P32 %s +; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck -check-prefix=P64 %s +; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names < %s -mtriple=powerpc64le-unknown-linux-gnu | FileCheck -check-prefix=P64 %s ; PR8327 define i8* @test1(i8** %foo) nounwind { @@ -8,16 +9,33 @@ } ; P32-LABEL: test1: -; P32: lwz r2, 0(r3) -; P32: addi r4, r2, 4 -; P32: stw r4, 0(r3) -; P32: lwz r3, 0(r2) -; P32: blr +; P32: lbz [[REG1:r[0-9]+]], 0(r3) +; P32: addi [[REG2:r[0-9]+]], [[REG1]], 1 +; P32: stb [[REG2]], 0(r3) +; P32: cmpwi [[REG1]], 8 +; P32: lwz [[REG3:r[0-9]+]], 4(r3) +; P32: slwi [[REG4:r[0-9]+]], [[REG1]], 2 +; P32: addi [[REG5:r[0-9]+]], [[REG3]], 4 +; P32: bc 12, lt, .LBB0_1 +; P32: b .LBB0_2 +; P32: .LBB0_1: +; P32: addi [[REG5]], [[REG3]], 0 +; P32: .LBB0_2: +; P32: stw [[REG5]], 4(r3) +; P32: lwz [[REG6:r[0-9]+]], 8(r3) +; P32: add [[REG6]], [[REG6]], [[REG4]] +; P32: bc 12, lt, .LBB0_4 +; P32: # %bb.3: +; P32: ori [[REG6]], [[REG2]], 0 +; P32: b .LBB0_4 +; P32: .LBB0_4: +; P32: lwz r3, 0([[REG6]]) +; P32: blr ; P64-LABEL: test1: -; P64: ld r2, 0(r3) -; P64: addi r4, r2, 8 -; P64: std r4, 0(r3) -; P64: ld r3, 0(r2) +; P64: ld [[REG1:r[0-9]+]], 0(r3) +; P64: addi [[REG2:r[0-9]+]], [[REG1]], 8 +; P64: std [[REG2]], 0(r3) +; P64: ld r3, 0([[REG1]]) ; P64: blr Index: llvm/test/CodeGen/PowerPC/vec_auto_constant.ll =================================================================== --- llvm/test/CodeGen/PowerPC/vec_auto_constant.ll +++ llvm/test/CodeGen/PowerPC/vec_auto_constant.ll @@ -1,4 +1,4 @@ -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -mcpu=g5 | FileCheck %s +; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -mcpu=g5 | FileCheck %s ; Formerly produced .long, 7320806 (partial) ; CHECK: .byte 22 ; CHECK: .byte 21 Index: llvm/test/CodeGen/PowerPC/vec_buildvector_loadstore.ll =================================================================== --- llvm/test/CodeGen/PowerPC/vec_buildvector_loadstore.ll +++ llvm/test/CodeGen/PowerPC/vec_buildvector_loadstore.ll @@ -1,11 +1,11 @@ -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -mattr=+altivec -disable-ppc-ilp-pref | FileCheck %s +; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -mattr=+altivec -disable-ppc-ilp-pref | FileCheck %s ; Formerly this did byte loads and word stores. @a = external global <16 x i8> @b = external global <16 x i8> @c = external global <16 x i8> define void @foo() nounwind ssp { -; CHECK: _foo: +; CHECK: foo: ; CHECK-NOT: stw entry: %tmp0 = load <16 x i8>, <16 x i8>* @a, align 16 Index: llvm/test/CodeGen/PowerPC/vec_misaligned.ll =================================================================== --- llvm/test/CodeGen/PowerPC/vec_misaligned.ll +++ llvm/test/CodeGen/PowerPC/vec_misaligned.ll @@ -3,7 +3,7 @@ ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -mattr=+altivec -mattr=-vsx -mattr=-power8-vector | FileCheck %s -check-prefix=CHECK-LE 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.S2203 = type { %struct.u16qi } %struct.u16qi = type { <16 x i8> } @s = weak global %struct.S2203 zeroinitializer ; <%struct.S2203*> [#uses=1] Index: llvm/test/CodeGen/PowerPC/vec_shuffle.ll =================================================================== --- llvm/test/CodeGen/PowerPC/vec_shuffle.ll +++ llvm/test/CodeGen/PowerPC/vec_shuffle.ll @@ -1,4 +1,4 @@ -; RUN: opt -mtriple=powerpc-apple-darwin < %s -instcombine | \ +; RUN: opt -mtriple=powerpc-unknown-linux-gnu < %s -instcombine | \ ; RUN: llc -mtriple=ppc32-- -mcpu=g5 | not grep vperm ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -mcpu=g5 > %t ; RUN: grep vsldoi %t | count 2 Index: llvm/test/CodeGen/PowerPC/vec_splat_constant.ll =================================================================== --- llvm/test/CodeGen/PowerPC/vec_splat_constant.ll +++ llvm/test/CodeGen/PowerPC/vec_splat_constant.ll @@ -1,11 +1,11 @@ -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-apple-darwin -mcpu=g5 | FileCheck %s +; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -mcpu=g5 | FileCheck %s ; Formerly incorrectly inserted vsldoi (endian confusion) @baz = common global <16 x i8> zeroinitializer ; <<16 x i8>*> [#uses=1] define void @foo(<16 x i8> %x) nounwind ssp { entry: -; CHECK: _foo: +; CHECK: foo: ; CHECK-NOT: vsldoi %x_addr = alloca <16 x i8> ; <<16 x i8>*> [#uses=2] %temp = alloca <16 x i8> ; <<16 x i8>*> [#uses=2] Index: llvm/test/CodeGen/PowerPC/vector-merge-store-fp-constants.ll =================================================================== --- llvm/test/CodeGen/PowerPC/vector-merge-store-fp-constants.ll +++ llvm/test/CodeGen/PowerPC/vector-merge-store-fp-constants.ll @@ -1,8 +1,8 @@ -; RUN: llc -verify-machineinstrs -mtriple=ppc64-apple-darwin < %s | FileCheck %s +; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -; CHECK-LABEL: {{^}}_merge_8_float_zero_stores: -; CHECK: li [[ZEROREG:r[0-9]+]], 0 -; CHECK-DAG: std [[ZEROREG]], 0([[PTR:r[0-9]+]]) +; CHECK-LABEL: {{^}}merge_8_float_zero_stores: +; CHECK: li [[ZEROREG:[0-9]+]], 0 +; CHECK-DAG: std [[ZEROREG]], 0([[PTR:[0-9]+]]) ; CHECK-DAG: std [[ZEROREG]], 8([[PTR]]) ; CHECK-DAG: std [[ZEROREG]], 16([[PTR]]) ; CHECK-DAG: std [[ZEROREG]], 24([[PTR]]) Index: llvm/test/CodeGen/PowerPC/vrsave-spill.ll =================================================================== --- llvm/test/CodeGen/PowerPC/vrsave-spill.ll +++ /dev/null @@ -1,19 +0,0 @@ -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-apple-darwin -mcpu=g5 | FileCheck %s -target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64" -target triple = "powerpc64-apple-darwin" - -define <4 x float> @foo(<4 x float> %a, <4 x float> %b) nounwind { -entry: - %c = fadd <4 x float> %a, %b - %d = fmul <4 x float> %c, %a - call void asm sideeffect "", "~{VRsave}"() nounwind - br label %return - -; CHECK: @foo -; CHECK: mfvrsave r{{[0-9]+}} -; CHECK: mtvrsave r{{[0-9]+}} - -return: ; preds = %entry - ret <4 x float> %d -} - Index: llvm/test/CodeGen/PowerPC/weak_def_can_be_hidden.ll =================================================================== --- llvm/test/CodeGen/PowerPC/weak_def_can_be_hidden.ll +++ llvm/test/CodeGen/PowerPC/weak_def_can_be_hidden.ll @@ -1,14 +1,10 @@ ; taken from X86 version of the same test -; RUN: llc -verify-machineinstrs -mtriple=powerpc-apple-darwin10 -O0 < %s | FileCheck %s -; RUN: llc -verify-machineinstrs -mtriple=powerpc-apple-darwin9 -O0 < %s | FileCheck --check-prefix=CHECK-D89 %s -; RUN: llc -verify-machineinstrs -mtriple=powerpc-apple-darwin8 -O0 < %s | FileCheck --check-prefix=CHECK-D89 %s +; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu -O0 < %s | FileCheck %s +; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O0 < %s | FileCheck %s @v1 = linkonce_odr local_unnamed_addr constant i32 32 -; CHECK: .globl _v1 -; CHECK: .weak_def_can_be_hidden _v1 - -; CHECK-D89: .globl _v1 -; CHECK-D89: .weak_definition _v1 +; CHECK: .section .rodata,"a" +; CHECK: .weak v1 define i32 @f1() { %x = load i32 , i32 * @v1 @@ -16,33 +12,22 @@ } @v2 = linkonce_odr constant i32 32 -; CHECK: .globl _v2 -; CHECK: .weak_definition _v2 - -; CHECK-D89: .globl _v2 -; CHECK-D89: .weak_definition _v2 +; CHECK: .weak v2 define i32* @f2() { ret i32* @v2 } @v3 = linkonce_odr unnamed_addr constant i32 32 -; CHECK: .globl _v3 -; CHECK: .weak_def_can_be_hidden _v3 - -; CHECK-D89: .globl _v3 -; CHECK-D89: .weak_definition _v3 +; CHECK: .section .rodata.cst4,"aM", +; CHECK: .weak v3 define i32* @f3() { ret i32* @v3 } @v4 = linkonce_odr unnamed_addr global i32 32 -; CHECK: .globl _v4 -; CHECK: .weak_def_can_be_hidden _v4 - -; CHECK-D89: .globl _v4 -; CHECK-D89: .weak_definition _v4 +; CHECK: .weak v4 define i32 @f4() { %x = load i32 , i32 * @v4 Index: llvm/test/CodeGen/SystemZ/combine_loads_from_build_pair.ll =================================================================== --- /dev/null +++ llvm/test/CodeGen/SystemZ/combine_loads_from_build_pair.ll @@ -0,0 +1,22 @@ +; RUN: llc -verify-machineinstrs -mtriple=s390x-linux-gnu < %s -debug -stop-after=machineverifier 2>&1 | FileCheck %s + +; REQUIRES: asserts +define i128 @func1({ i128, 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: [[LOBITS:t[0-9]+]]: i64,ch = load<(load 8)> +; CHECK: [[HIBITS:t[0-9]+]]: i64,ch = load<(load 8)> +; CHECK: Combining: t{{[0-9]+}}: i128 = build_pair [[LOBITS]], [[HIBITS]] +; CHECK-NEXT: Creating new node +; CHECK-SAME: load<(load 16, align 8)> +; CHECK-NEXT: into +; CHECK-SAME: load<(load 16, align 8)> +; CHECK-LABEL: Optimized lowered selection DAG: + %result = extractvalue {i128, i8* } %struct, 0 + ret i128 %result +} + Index: llvm/test/Transforms/GlobalOpt/2007-11-09-GEP-GEP-Crash.ll =================================================================== --- llvm/test/Transforms/GlobalOpt/2007-11-09-GEP-GEP-Crash.ll +++ llvm/test/Transforms/GlobalOpt/2007-11-09-GEP-GEP-Crash.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -globalopt -disable-output 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.empty0 = type { } %struct.es = type { %struct.empty0 } %struct.es1 = type { %struct.empty0 } Index: llvm/test/Transforms/IndVarSimplify/dangling-use.ll =================================================================== --- llvm/test/Transforms/IndVarSimplify/dangling-use.ll +++ llvm/test/Transforms/IndVarSimplify/dangling-use.ll @@ -1,7 +1,7 @@ ; RUN: opt -indvars -disable-output < %s target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i8: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-darwin11" +target triple = "powerpc-unknown-linux-gnu" define void @vec_inverse_5_7_vert_loop_copyseparate(i8* %x, i32 %n, i32 %rowbytes) nounwind { entry: Index: llvm/test/Transforms/InstCombine/2007-05-14-Crash.ll =================================================================== --- llvm/test/Transforms/InstCombine/2007-05-14-Crash.ll +++ llvm/test/Transforms/InstCombine/2007-05-14-Crash.ll @@ -1,7 +1,7 @@ ; RUN: opt < %s -instcombine -disable-output 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.abc = type { i32, [32 x i8] } %struct.def = type { i8**, %struct.abc } Index: llvm/test/Transforms/InstCombine/2007-10-31-RangeCrash.ll =================================================================== --- llvm/test/Transforms/InstCombine/2007-10-31-RangeCrash.ll +++ llvm/test/Transforms/InstCombine/2007-10-31-RangeCrash.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -instcombine -disable-output 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 i32 @test() { entry: Index: llvm/test/Transforms/SCCP/2006-10-23-IPSCCP-Crash.ll =================================================================== --- llvm/test/Transforms/SCCP/2006-10-23-IPSCCP-Crash.ll +++ llvm/test/Transforms/SCCP/2006-10-23-IPSCCP-Crash.ll @@ -1,7 +1,7 @@ ; RUN: opt < %s -sccp -disable-output ; END. target datalayout = "E-p:32:32" -target triple = "powerpc-apple-darwin8.7.0" +target triple = "powerpc-unknown-linux-gnu" %struct.pat_list = type { i32, %struct.pat_list* } @JUMP = external global i32 ; [#uses=1] @old_D_pat = external global [16 x i8] ; <[16 x i8]*> [#uses=0] Index: llvm/test/Transforms/SCCP/2006-12-04-PackedType.ll =================================================================== --- llvm/test/Transforms/SCCP/2006-12-04-PackedType.ll +++ llvm/test/Transforms/SCCP/2006-12-04-PackedType.ll @@ -5,7 +5,7 @@ ; END. target datalayout = "E-p:32:32" -target triple = "powerpc-apple-darwin8" +target triple = "powerpc-unknown-linux-gnu" %struct.GLDAlphaTest = type { float, i16, i8, i8 } %struct.GLDArrayRange = type { i8, i8, i8, i8 } %struct.GLDBlendMode = type { i16, i16, i16, i16, %struct.GLTColor4, i16, i16, i8, i8, i8, i8 } Index: llvm/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll =================================================================== --- llvm/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll +++ llvm/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll @@ -2,7 +2,7 @@ ; PR867 target datalayout = "E-p:32:32" -target triple = "powerpc-apple-darwin8" +target triple = "powerpc-unknown-linux-gnu" %struct.CUMULATIVE_ARGS = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } %struct.eh_status = type opaque %struct.emit_status = type { i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack*, i32, %struct.location_t, i32, i8*, %struct.rtx_def** } Index: llvm/test/tools/dsymutil/PowerPC/lit.local.cfg =================================================================== --- llvm/test/tools/dsymutil/PowerPC/lit.local.cfg +++ /dev/null @@ -1,4 +0,0 @@ -if not 'PowerPC' in config.root.targets: - config.unsupported = True - -config.suffixes = ['.test', '.cpp', '.c'] Index: llvm/test/tools/dsymutil/PowerPC/sibling.test =================================================================== --- llvm/test/tools/dsymutil/PowerPC/sibling.test +++ /dev/null @@ -1,33 +0,0 @@ -# Verify that we don't follow DW_AT_sibling references. -# -# Source: -# struct A { }; -# struct B { }; -# -# struct C { -# A a; -# }; -# -# B b; -# C c; -# -# Compiled with Apple-GCC 4.0.1 (build 5370): -# g++ -g -c sibling.cpp -o sibling.o - -# RUN: dsymutil -arch ppc -f -oso-prepend-path=%p/../Inputs/ -y %s -o - | llvm-dwarfdump -debug-info - | FileCheck %s - -# CHECK: DW_TAG_structure_type -# CHECK-NEXT: DW_AT_name ("A") -# CHECK: DW_TAG_structure_type -# CHECK-NEXT: DW_AT_name ("C") - -# CHECK-NOT: DW_AT_name ("B") - ---- -triple: 'ppc-apple-darwin' -objects: - - filename: sibling.o - timestamp: 1518197670 - symbols: - - { sym: _c, objAddr: 0x000000000000017e, binAddr: 0x0000000100000FA0, size: 0x00000010 } -...