55 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 32; RUN: llc -mtriple=sparcv9 %s -start-before=sparc-isel -o - -stop-after=sparc-isel | FileCheck %s3 4target datalayout = "E-m:e-i64:64-n32:64-S128"5target triple = "sparcv9"6 7define void @pointer_add_unknown_offset(ptr %base, i32 %offset) !dbg !7 {8 ; CHECK-LABEL: name: pointer_add_unknown_offset9 ; CHECK: bb.0.entry:10 ; CHECK-NEXT: liveins: $i0, $i111 ; CHECK-NEXT: {{ $}}12 ; CHECK-NEXT: [[COPY:%[0-9]+]]:i64regs = COPY $i113 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:i64regs = COPY $i014 ; CHECK-NEXT: [[SRAri:%[0-9]+]]:i64regs = SRAri [[COPY]], 015 ; CHECK-NEXT: [[SLLXri:%[0-9]+]]:i64regs = nsw SLLXri killed [[SRAri]], 216 ; CHECK-NEXT: DBG_VALUE_LIST !13, !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_stack_value), [[COPY1]], [[SLLXri]], debug-location !1617 ; CHECK-NEXT: DBG_VALUE_LIST !14, !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_plus_uconst, 3, DW_OP_stack_value), [[COPY1]], [[SLLXri]], debug-location !1618 ; CHECK-NEXT: DBG_VALUE_LIST !15, !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 2, DW_OP_plus, DW_OP_LLVM_arg, 1, DW_OP_LLVM_arg, 3, DW_OP_plus, DW_OP_plus, DW_OP_stack_value), [[COPY1]], [[COPY1]], [[SLLXri]], [[SLLXri]], debug-location !1619 ; CHECK-NEXT: [[ORri:%[0-9]+]]:intregs = ORri $g0, 4220 ; CHECK-NEXT: STrr [[COPY1]], killed [[SLLXri]], killed [[ORri]] :: (store (s32) into %ir.add.ptr)21 ; CHECK-NEXT: RETL 822entry:23 %idx.ext = sext i32 %offset to i6424 %add.ptr = getelementptr inbounds i32, ptr %base, i64 %idx.ext25 call void @llvm.dbg.value(metadata ptr %add.ptr, metadata !13, metadata !DIExpression()), !dbg !1626 call void @llvm.dbg.value(metadata ptr %add.ptr, metadata !14, metadata !DIExpression(DW_OP_plus_uconst, 3, DW_OP_stack_value)), !dbg !1627 call void @llvm.dbg.value(metadata !DIArgList(ptr %add.ptr, ptr %add.ptr), metadata !15, metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus)), !dbg !1628 store i32 42, ptr %add.ptr, align 429 ret void30}31 32declare void @llvm.dbg.value(metadata, metadata, metadata)33 34!llvm.dbg.cu = !{!0}35!llvm.module.flags = !{!2, !3, !4, !5}36!llvm.ident = !{!6}37 38!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)39!1 = !DIFile(filename: "test.c", directory: "/tmp", checksumkind: CSK_MD5, checksum: "4321633e52cefeee6e307c697a82574f")40!2 = !{i32 7, !"Dwarf Version", i32 5}41!3 = !{i32 2, !"Debug Info Version", i32 3}42!4 = !{i32 1, !"wchar_size", i32 4}43!5 = !{i32 7, !"debug-info-assignment-tracking", i1 true}44!6 = !{!"clang"}45!7 = distinct !DISubprogram(name: "pointer_add_unknown_offset", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12)46!8 = !DISubroutineType(types: !9)47!9 = !{null, !10, !11}48!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !11, size: 64)49!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)50!12 = !{!13, !14, !15}51!13 = !DILocalVariable(name: "p", scope: !7, file: !1, line: 2, type: !10)52!14 = !DILocalVariable(name: "q", scope: !7, file: !1, line: 2, type: !10)53!15 = !DILocalVariable(name: "r", scope: !7, file: !1, line: 2, type: !10)54!16 = !DILocation(line: 0, scope: !7)55