82 lines · plain
1; RUN: llc -mtriple powerpc-ibm-aix-xcoff -stop-after=machine-cp \2; RUN: -mcpu=pwr4 -mattr=-altivec -verify-machineinstrs 2>&1 < %s | \3; RUN: FileCheck --check-prefix=CHECK32 %s4 5; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -stop-after=machine-cp \6; RUN: -mcpu=pwr4 -mattr=-altivec -verify-machineinstrs 2>&1 < %s | \7; RUN: FileCheck --check-prefix=CHECK64 %s8 9%struct.Spill = type { [12 x i64 ] }10@GS = external global %struct.Spill, align 411 12define i64 @test(ptr byval(%struct.Spill) align 4 %s) {13entry:14 %arrayidx_a = getelementptr inbounds %struct.Spill, ptr %s, i32 0, i32 0, i32 215 %arrayidx_b = getelementptr inbounds %struct.Spill, ptr %s, i32 0, i32 0, i32 1016 %a = load i64, ptr %arrayidx_a17 %b = load i64, ptr %arrayidx_b18 %add = add i64 %a, %b19 ret i64 %add20}21 22; CHECK32: name: test23; CHECK32: liveins:24; CHECK32: - { reg: '$r3', virtual-reg: '' }25; CHECK32: - { reg: '$r4', virtual-reg: '' }26; CHECK32: - { reg: '$r5', virtual-reg: '' }27; CHECK32: - { reg: '$r6', virtual-reg: '' }28; CHECK32: - { reg: '$r7', virtual-reg: '' }29; CHECK32: - { reg: '$r8', virtual-reg: '' }30; CHECK32: - { reg: '$r9', virtual-reg: '' }31; CHECK32: - { reg: '$r10', virtual-reg: '' }32; CHECK32: fixedStack:33; CHECK32: - { id: 0, type: default, offset: 24, size: 96, alignment: 8, stack-id: default,34; CHECK32: stack: []35 36; CHECK32: bb.0.entry:37; CHECK32-NEXT: liveins: $r3, $r4, $r5, $r6, $r7, $r8, $r9, $r1038 39; CHECK32: renamable $r[[REG1:[0-9]+]] = LWZ 80, %fixed-stack.040; CHECK32-DAG: STW killed renamable $r3, 0, %fixed-stack.0 :: (store (s32) into %fixed-stack.041; CHECK32-DAG: STW killed renamable $r4, 4, %fixed-stack.0 :: (store (s32) into %fixed-stack.0 + 442; CHECK32: renamable $r[[REG2:[0-9]+]] = LWZ 84, %fixed-stack.043; CHECK32-DAG: STW killed renamable $r5, 8, %fixed-stack.0 :: (store (s32) into %fixed-stack.0 + 844; CHECK32-DAG: STW killed renamable $r6, 12, %fixed-stack.0 :: (store (s32) into %fixed-stack.0 + 1245; CHECK32-DAG: STW renamable $r7, 16, %fixed-stack.0 :: (store (s32) into %fixed-stack.0 + 1646; CHECK32-DAG: STW renamable $r8, 20, %fixed-stack.0 :: (store (s32) into %fixed-stack.0 + 2047; CHECK32-DAG: STW killed renamable $r9, 24, %fixed-stack.0 :: (store (s32) into %fixed-stack.0 + 2448; CHECK32: renamable $r4 = ADDC killed renamable $r8, killed renamable $r[[REG2]], implicit-def $carry49; CHECK32: renamable $r3 = ADDE killed renamable $r7, killed renamable $r[[REG1]], implicit-def dead $carry, implicit killed $carry50; CHECK32 STW killed renamable $r10, 28, %fixed-stack.0 :: (store (s32) into %fixed-stack.0 + 2851; CHECK32: BLR implicit $lr, implicit $rm, implicit $r3, implicit $r452 53 54; CHECK64: name: test55; CHECK64: liveins:56; CHECK64: - { reg: '$x3', virtual-reg: '' }57; CHECK64: - { reg: '$x4', virtual-reg: '' }58; CHECK64: - { reg: '$x5', virtual-reg: '' }59; CHECK64: - { reg: '$x6', virtual-reg: '' }60; CHECK64: - { reg: '$x7', virtual-reg: '' }61; CHECK64: - { reg: '$x8', virtual-reg: '' }62; CHECK64: - { reg: '$x9', virtual-reg: '' }63; CHECK64: - { reg: '$x10', virtual-reg: '' }64; CHECK64: fixedStack:65; CHECK64: - { id: 0, type: default, offset: 48, size: 96, alignment: 16, stack-id: default,66; CHECK64: stack: []67 68; CHECK64: bb.0.entry:69; CHECK64: liveins: $x3, $x4, $x5, $x6, $x7, $x8, $x9, $x1070 71; CHECK64: renamable $x[[REG1:[0-9]+]] = LD 80, %fixed-stack.072; CHECK64: STD killed renamable $x3, 0, %fixed-stack.0 :: (store (s64) into %fixed-stack.073; CHECK64: STD killed renamable $x4, 8, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 874; CHECK64: STD renamable $x5, 16, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 1675; CHECK64: STD killed renamable $x6, 24, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 2476; CHECK64: STD killed renamable $x7, 32, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 3277; CHECK64: STD killed renamable $x8, 40, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 4078; CHECK64: STD killed renamable $x9, 48, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 4879; CHECK64: renamable $x3 = ADD8 killed renamable $x5, killed renamable $x[[REG1]]80; CHECK64: STD killed renamable $x10, 56, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 5681; CHECK64: BLR8 implicit $lr8, implicit $rm, implicit $x382