1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt -S < %s | FileCheck %s 3define <4 x i32> @load(ptr nocapture readonly %a0) !dbg !8 { 4; CHECK-LABEL: @load( 5; CHECK-NEXT: entry: 6; CHECK-NEXT: [[V0:%.*]] = call <4 x i32> @llvm.masked.load.v4i32.p0(ptr [[A0:%.*]], i32 16, <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i32> undef), !dbg [[DBG19:![0-9]+]], !tbaa [[TBAA20:![0-9]+]] 7; CHECK-NEXT: ret <4 x i32> [[V0]], !dbg [[DBG23:![0-9]+]] 8; 9entry: 10 %v0 = call <4 x i32> @llvm.masked.load.v4i32.p0(ptr %a0, i32 16, <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i32> undef), !dbg !19, !tbaa !20 11 ret <4 x i32> %v0, !dbg !23 12} 13 14define void @store(<4 x i32> %a0, ptr nocapture %a1) !dbg !24 { 15; CHECK-LABEL: @store( 16; CHECK-NEXT: entry: 17; CHECK-NEXT: call void @llvm.masked.store.v4i32.p0(<4 x i32> [[A0:%.*]], ptr [[A1:%.*]], i32 16, <4 x i1> <i1 false, i1 true, i1 false, i1 true>), !dbg [[DBG30:![0-9]+]], !tbaa [[TBAA20]] 18; CHECK-NEXT: ret void, !dbg [[DBG31:![0-9]+]] 19; 20entry: 21 call void @llvm.masked.store.v4i32.p0(<4 x i32> %a0, ptr %a1, i32 16, <4 x i1> <i1 false, i1 true, i1 false, i1 true>), !dbg !30, !tbaa !20 22 ret void, !dbg !31 23} 24 25define <4 x i32> @gather(<4 x ptr> %a0) !dbg !32 { 26; CHECK-LABEL: @gather( 27; CHECK-NEXT: entry: 28; CHECK-NEXT: [[V0:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0(<4 x ptr> [[A0:%.*]], i32 16, <4 x i1> <i1 true, i1 true, i1 true, i1 false>, <4 x i32> undef), !dbg [[DBG35:![0-9]+]], !tbaa [[TBAA20]] 29; CHECK-NEXT: ret <4 x i32> [[V0]], !dbg [[DBG36:![0-9]+]] 30; 31entry: 32 %v0 = call <4 x i32> @llvm.masked.gather.v4i32.v4p0(<4 x ptr> %a0, i32 16, <4 x i1> <i1 true, i1 true, i1 true, i1 false>, <4 x i32> undef), !dbg !35, !tbaa !20 33 ret <4 x i32> %v0, !dbg !36 34} 35 36define void @scatter(<4 x i32> %a0, <4 x ptr> %a1) !dbg !37 { 37; CHECK-LABEL: @scatter( 38; CHECK-NEXT: entry: 39; CHECK-NEXT: call void @llvm.masked.scatter.v4i32.v4p0(<4 x i32> [[A0:%.*]], <4 x ptr> [[A1:%.*]], i32 16, <4 x i1> <i1 false, i1 true, i1 true, i1 true>), !dbg [[DBG41:![0-9]+]], !tbaa [[TBAA20]] 40; CHECK-NEXT: ret void, !dbg [[DBG42:![0-9]+]] 41; 42entry: 43 call void @llvm.masked.scatter.v4i32.v4p0(<4 x i32> %a0, <4 x ptr> %a1, i32 16, <4 x i1> <i1 false, i1 true, i1 true, i1 true>), !dbg !41, !tbaa !20 44 ret void, !dbg !42 45} 46 47define <4 x i32> @expandload(ptr nocapture readonly %a0) !dbg !43 { 48; CHECK-LABEL: @expandload( 49; CHECK-NEXT: entry: 50; CHECK-NEXT: [[V0:%.*]] = call <4 x i32> @llvm.masked.expandload.v4i32(ptr [[A0:%.*]], <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x i32> undef), !dbg [[DBG49:![0-9]+]], !tbaa [[TBAA50:![0-9]+]] 51; CHECK-NEXT: ret <4 x i32> [[V0]], !dbg [[DBG52:![0-9]+]] 52; 53entry: 54 %v0 = call <4 x i32> @llvm.masked.expandload.v4i32(ptr %a0, <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x i32> undef), !dbg !49, !tbaa !50 55 ret <4 x i32> %v0, !dbg !52 56} 57 58define void @compressstore(<4 x i32> %a0, ptr nocapture %a1) !dbg !53 { 59; CHECK-LABEL: @compressstore( 60; CHECK-NEXT: entry: 61; CHECK-NEXT: call void @llvm.masked.compressstore.v4i32(<4 x i32> [[A0:%.*]], ptr [[A1:%.*]], <4 x i1> <i1 false, i1 false, i1 true, i1 true>), !dbg [[DBG59:![0-9]+]], !tbaa [[TBAA50]] 62; CHECK-NEXT: ret void, !dbg [[DBG60:![0-9]+]] 63; 64entry: 65 call void @llvm.masked.compressstore.v4i32(<4 x i32> %a0, ptr %a1, <4 x i1> <i1 false, i1 false, i1 true, i1 true>), !dbg !59, !tbaa !50 66 ret void, !dbg !60 67} 68 69declare <4 x i32> @llvm.masked.load.v4i32.p0(ptr, i32 immarg, <4 x i1>, <4 x i32>) #0 70declare void @llvm.masked.store.v4i32.p0(<4 x i32>, ptr, i32 immarg, <4 x i1>) #1 71declare <4 x i32> @llvm.masked.gather.v4i32.v4p0(<4 x ptr>, i32 immarg, <4 x i1>, <4 x i32>) #2 72declare void @llvm.masked.scatter.v4i32.v4p0(<4 x i32>, <4 x ptr>, i32 immarg, <4 x i1>) #3 73declare <4 x i32> @llvm.masked.expandload.v4i32(ptr, <4 x i1>, <4 x i32>) #2 74declare void @llvm.masked.compressstore.v4i32(<4 x i32>, ptr, <4 x i1>) #1 75 76attributes #0 = { argmemonly nofree nosync nounwind readonly willreturn } 77attributes #1 = { argmemonly nofree nosync nounwind willreturn writeonly } 78attributes #2 = { nofree nosync nounwind readonly willreturn } 79attributes #3 = { nofree nosync nounwind willreturn writeonly } 80 81!llvm.dbg.cu = !{!0} 82!llvm.module.flags = !{!3, !4, !5, !6} 83!llvm.ident = !{!7} 84 85!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 13.0.0 (https://github.com/llvm/llvm-project 985ab6e1fa575fc41ebfdafbba401e5787661584)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) 86!1 = !DIFile(filename: "test.c", directory: "/test") 87!2 = !{} 88!3 = !{i32 7, !"Dwarf Version", i32 4} 89!4 = !{i32 2, !"Debug Info Version", i32 3} 90!5 = !{i32 1, !"wchar_size", i32 4} 91!6 = !{i32 7, !"uwtable", i32 1} 92!7 = !{!"clang version 13.0.0 (https://github.com/llvm/llvm-project 985ab6e1fa575fc41ebfdafbba401e5787661584)"} 93!8 = distinct !DISubprogram(name: "load", scope: !1, file: !1, line: 3, type: !9, scopeLine: 3, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !17) 94!9 = !DISubroutineType(types: !10) 95!10 = !{!11, !16} 96!11 = !DIDerivedType(tag: DW_TAG_typedef, name: "v4i32", file: !1, line: 1, baseType: !12) 97!12 = !DICompositeType(tag: DW_TAG_array_type, baseType: !13, size: 128, flags: DIFlagVector, elements: !14) 98!13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 99!14 = !{!15} 100!15 = !DISubrange(count: 4) 101!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !11, size: 64) 102!17 = !{!18} 103!18 = !DILocalVariable(name: "a0", arg: 1, scope: !8, file: !1, line: 3, type: !16) 104!19 = !DILocation(line: 4, column: 10, scope: !8) 105!20 = !{!21, !21, i64 0} 106!21 = !{!"omnipotent char", !22, i64 0} 107!22 = !{!"Simple C/C++ TBAA"} 108!23 = !DILocation(line: 4, column: 3, scope: !8) 109!24 = distinct !DISubprogram(name: "store", scope: !1, file: !1, line: 7, type: !25, scopeLine: 7, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !27) 110!25 = !DISubroutineType(types: !26) 111!26 = !{null, !11, !16} 112!27 = !{!28, !29} 113!28 = !DILocalVariable(name: "a0", arg: 1, scope: !24, file: !1, line: 7, type: !11) 114!29 = !DILocalVariable(name: "a1", arg: 2, scope: !24, file: !1, line: 7, type: !16) 115!30 = !DILocation(line: 8, column: 7, scope: !24) 116!31 = !DILocation(line: 9, column: 1, scope: !24) 117!32 = distinct !DISubprogram(name: "gather", scope: !1, file: !1, line: 11, type: !9, scopeLine: 11, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !33) 118!33 = !{!34} 119!34 = !DILocalVariable(name: "a0", arg: 1, scope: !32, file: !1, line: 11, type: !16) 120!35 = !DILocation(line: 12, column: 10, scope: !32) 121!36 = !DILocation(line: 12, column: 3, scope: !32) 122!37 = distinct !DISubprogram(name: "scatter", scope: !1, file: !1, line: 15, type: !25, scopeLine: 15, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !38) 123!38 = !{!39, !40} 124!39 = !DILocalVariable(name: "a0", arg: 1, scope: !37, file: !1, line: 15, type: !11) 125!40 = !DILocalVariable(name: "a1", arg: 2, scope: !37, file: !1, line: 15, type: !16) 126!41 = !DILocation(line: 16, column: 7, scope: !37) 127!42 = !DILocation(line: 17, column: 1, scope: !37) 128!43 = distinct !DISubprogram(name: "expandload", scope: !1, file: !1, line: 19, type: !44, scopeLine: 19, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !47) 129!44 = !DISubroutineType(types: !45) 130!45 = !{!11, !46} 131!46 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !13, size: 64) 132!47 = !{!48} 133!48 = !DILocalVariable(name: "a0", arg: 1, scope: !43, file: !1, line: 19, type: !46) 134!49 = !DILocation(line: 19, column: 40, scope: !43) 135!50 = !{!51, !51, i64 0} 136!51 = !{!"int", !21, i64 0} 137!52 = !DILocation(line: 20, column: 3, scope: !43) 138!53 = distinct !DISubprogram(name: "compressstore", scope: !1, file: !1, line: 23, type: !54, scopeLine: 23, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !56) 139!54 = !DISubroutineType(types: !55) 140!55 = !{null, !11, !46} 141!56 = !{!57, !58} 142!57 = !DILocalVariable(name: "a0", arg: 1, scope: !53, file: !1, line: 23, type: !11) 143!58 = !DILocalVariable(name: "a1", arg: 2, scope: !53, file: !1, line: 23, type: !46) 144!59 = !DILocation(line: 24, column: 7, scope: !53) 145!60 = !DILocation(line: 25, column: 1, scope: !53) 146