From ac809854cc68b5dcae0139630013038e634117b0 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Mon, 23 May 2011 17:49:29 +0000 Subject: [PATCH] Test case for r131908. llvm-svn: 131909 --- test/CodeGen/X86/dbg-value-isel.ll | 102 +++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 test/CodeGen/X86/dbg-value-isel.ll diff --git a/test/CodeGen/X86/dbg-value-isel.ll b/test/CodeGen/X86/dbg-value-isel.ll new file mode 100644 index 00000000000..dc19ff34ff7 --- /dev/null +++ b/test/CodeGen/X86/dbg-value-isel.ll @@ -0,0 +1,102 @@ +; RUN: llc < %s | 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-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" +target triple = "x86_64-apple-darwin10.0.0" +; PR 9879 + +; CHECK: ##DEBUG_VALUE: tid <- R14D+0 +%0 = type { i8*, i8*, i8*, i8*, i32 } + +@sgv = internal addrspace(2) constant [1 x i8] zeroinitializer +@fgv = internal addrspace(2) constant [1 x i8] zeroinitializer +@lvgv = internal constant [0 x i8*] zeroinitializer +@llvm.global.annotations = appending global [1 x %0] [%0 { i8* bitcast (void (i32 addrspace(1)*)* @__OpenCL_nbt02_kernel to i8*), i8* bitcast ([1 x i8] addrspace(2)* @sgv to i8*), i8* bitcast ([1 x i8] addrspace(2)* @fgv to i8*), i8* bitcast ([0 x i8*]* @lvgv to i8*), i32 0 }], section "llvm.metadata" + +define void @__OpenCL_nbt02_kernel(i32 addrspace(1)* %ip) nounwind { +entry: + call void @llvm.dbg.value(metadata !{i32 addrspace(1)* %ip}, i64 0, metadata !8), !dbg !9 + %0 = call <4 x i32> @__amdil_get_local_id_int() nounwind + %1 = extractelement <4 x i32> %0, i32 0 + br label %2 + +;