; RUN:    llvm-mutate -f %s -q U1 2>&1 | filecheck %s
; CHECK:  //usr/lib/llvm-11/lib/clang/11.1.0/include/__clang_cuda_builtin_vars.h:53:3

define dso_local void @_Z4axpyfPfS_(float %A1, float* nocapture readonly %A2, float* nocapture %A3) !dbg !11 {
  %U1 = tail call i32 @llvm.nvvm.read.ptx.sreg.tid.x(), !dbg !13, !uniqueID !17
  %U2 = zext i32 %U1 to i64, !dbg !18, !uniqueID !19
  %U3 = getelementptr inbounds float, float* %A2, i64 %U2, !dbg !18, !uniqueID !20
  %U4 = load float, float* %U3, align 4, !dbg !18, !uniqueID !21
  %U5 = fmul contract float %U4, %A1, !dbg !22, !uniqueID !23
  %U6 = fadd contract float %U4, %U5, !dbg !24, !uniqueID !25
  %U7 = getelementptr inbounds float, float* %A3, i64 %U2, !dbg !26, !uniqueID !27
  store float %U6, float* %U7, align 4, !dbg !28, !uniqueID !29
  ret void, !dbg !30, !uniqueID !31
}

; Function Attrs: nounwind readnone
declare i32 @llvm.nvvm.read.ptx.sreg.tid.x() #0

attributes #0 = { nounwind readnone }

!llvm.module.flags = !{!0, !1, !2, !3, !4}
!llvm.dbg.cu = !{!5}
!nvvm.annotations = !{!8}
!llvm.ident = !{!9, !10}

!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 11, i32 0]}
!1 = !{i32 7, !"Dwarf Version", i32 2}
!2 = !{i32 2, !"Debug Info Version", i32 3}
!3 = !{i32 1, !"wchar_size", i32 4}
!4 = !{i32 4, !"nvvm-reflect-ftz", i32 0}
!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "Ubuntu clang version 11.1.0-++20210204121720+1fdec59bffc1-1~exp1~20210203232336.162", isOptimized: true, runtimeVersion: 0, emissionKind: DebugDirectivesOnly, enums: !7, splitDebugInlining: false, nameTableKind: None)
!6 = !DIFile(filename: "axpy.cu", directory: "/you_think_you_do")
!7 = !{}
!8 = !{void (float, float*, float*)* @_Z4axpyfPfS_, !"kernel", i32 1}
!9 = !{!"Ubuntu clang version 11.1.0-++20210204121720+1fdec59bffc1-1~exp1~20210203232336.162"}
!10 = !{!"clang version 3.8.0 (tags/RELEASE_380/final)"}
!11 = distinct !DISubprogram(name: "axpy", scope: !6, file: !6, line: 3, type: !12, scopeLine: 3, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !5, retainedNodes: !7)
!12 = !DISubroutineType(types: !7)
!13 = !DILocation(line: 53, column: 3, scope: !14, inlinedAt: !16)
!14 = distinct !DISubprogram(name: "__fetch_builtin_x", scope: !15, file: !15, line: 53, type: !12, scopeLine: 53, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !5, retainedNodes: !7)
!15 = !DIFile(filename: "/usr/lib/llvm-11/lib/clang/11.1.0/include/__clang_cuda_builtin_vars.h", directory: "")
!16 = distinct !DILocation(line: 4, column: 26, scope: !11)
!17 = !{!"U1"}
!18 = !DILocation(line: 4, column: 24, scope: !11)
!19 = !{!"U2"}
!20 = !{!"U3"}
!21 = !{!"U4"}
!22 = !DILocation(line: 4, column: 22, scope: !11)
!23 = !{!"U5"}
!24 = !DILocation(line: 4, column: 39, scope: !11)
!25 = !{!"U6"}
!26 = !DILocation(line: 4, column: 3, scope: !11)
!27 = !{!"U7"}
!28 = !DILocation(line: 4, column: 18, scope: !11)
!29 = !{!"U8"}
!30 = !DILocation(line: 5, column: 1, scope: !11)
!31 = !{!"U9"}
