; RUN: llc -filetype=obj -O0 < %s ; Test that we handle DBG_VALUEs in a register without crashing. ; ; Generated from clang with -fsanitize=address: ; struct A { ; A(); ; A(const A&); ; }; ; ; A func(int) { ; A a; ; return a; ; } 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-S128" target triple = "x86_64-unknown-linux-gnu" %struct.A = type { i8 } @__asan_mapping_offset = linkonce_odr constant i64 2147450880 @__asan_mapping_scale = linkonce_odr constant i64 3 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 1, void ()* @asan.module_ctor, i8* null }] @___asan_gen_ = private unnamed_addr constant [16 x i8] c"1 32 4 5 .addr \00", align 1 ; Function Attrs: sanitize_address uwtable define void @_Z4funci(%struct.A* noalias sret(%struct.A) %agg.result, i32) #0 "stack-protector-buffer-size"="1" !dbg !4 { entry: %MyAlloca = alloca [96 x i8], align 32 %1 = ptrtoint [96 x i8]* %MyAlloca to i64 %2 = add i64 %1, 32 %3 = inttoptr i64 %2 to i32* %4 = inttoptr i64 %1 to i64* store i64 1102416563, i64* %4 %5 = add i64 %1, 8 %6 = inttoptr i64 %5 to i64* store i64 ptrtoint ([16 x i8]* @___asan_gen_ to i64), i64* %6 %7 = add i64 %1, 16 %8 = inttoptr i64 %7 to i64* store i64 ptrtoint (void (%struct.A*, i32)* @_Z4funci to i64), i64* %8 %9 = lshr i64 %1, 3 %10 = add i64 %9, 2147450880 %11 = inttoptr i64 %10 to i32* store i32 -235802127, i32* %11 %12 = add i64 %10, 4 %13 = inttoptr i64 %12 to i32* store i32 -185273340, i32* %13 %14 = add i64 %10, 8 %15 = inttoptr i64 %14 to i32* store i32 -202116109, i32* %15 %16 = ptrtoint i32* %3 to i64 %17 = lshr i64 %16, 3 %18 = add i64 %17, 2147450880 %19 = inttoptr i64 %18 to i8* %20 = load i8, i8* %19 %21 = icmp ne i8 %20, 0 call void @llvm.dbg.declare(metadata i32* %3, metadata !23, metadata !28), !dbg !DILocation(scope: !4) br i1 %21, label %22, label %28 ;