From 0b485908ed5bb9e788618773276b43be2e5a37df Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 15 Jul 2013 22:28:45 +0000 Subject: [PATCH] Further simplify test case from r186119/r186035. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186356 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/DebugInfo/X86/dbg_value_direct.ll | 215 +++++++++++-------------- 1 file changed, 93 insertions(+), 122 deletions(-) diff --git a/test/DebugInfo/X86/dbg_value_direct.ll b/test/DebugInfo/X86/dbg_value_direct.ll index 3ac428d4b60..f095ece2e0d 100644 --- a/test/DebugInfo/X86/dbg_value_direct.ll +++ b/test/DebugInfo/X86/dbg_value_direct.ll @@ -1,97 +1,93 @@ ; RUN: llc -filetype=obj -O0 -stack-protector-buffer-size=1 < %s ; Test that we handle DBG_VALUEs in a register without crashing. ; -; Generated from: (with -fsanitize=address) -; class C -; { -; public: -; C (const C &) -; { } +; Generated from clang with -fsanitize=address: +; struct A { +; A(); +; A(const A&); ; }; -; class A -; { -; struct D:C {}; -; D _M_dataplus; -; public: -; A (int *); -; }; -; A operator+ (A, const char *) -; { -; A a(0); +; +; 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-apple-macosx10.9.0" +target triple = "x86_64-unknown-linux-gnu" -%class.A = type { %"struct.A::D" } -%"struct.A::D" = type { i8 } +%struct.A = type { i8 } -@__asan_mapping_offset = linkonce_odr constant i64 17592186044416 +@__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 ()* }] [{ i32, void ()* } { i32 1, void ()* @asan.module_ctor }] -@__asan_gen_ = private unnamed_addr constant [16 x i8] c"1 32 8 5 .addr \00", align 1 +@__asan_gen_ = private unnamed_addr constant [16 x i8] c"1 32 4 5 .addr \00", align 1 -; Function Attrs: ssp sanitize_address uwtable -define void @_Zpl1APKc(%class.A* noalias sret %agg.result, %class.A*, i8*) #0 { +; Function Attrs: sanitize_address uwtable +define void @_Z4funci(%struct.A* noalias sret %agg.result, i32) #0 { entry: %MyAlloca = alloca [96 x i8], align 32 - %2 = ptrtoint [96 x i8]* %MyAlloca to i64 - %3 = add i64 %2, 32 - %4 = inttoptr i64 %3 to i8** - %5 = inttoptr i64 %2 to i64* - store i64 1102416563, i64* %5 - %6 = add i64 %2, 8 - %7 = inttoptr i64 %6 to i64* - store i64 ptrtoint ([16 x i8]* @__asan_gen_ to i64), i64* %7 - %8 = add i64 %2, 16 - %9 = inttoptr i64 %8 to i64* - store i64 ptrtoint (void (%class.A*, %class.A*, i8*)* @_Zpl1APKc to i64), i64* %9 - %10 = lshr i64 %2, 3 - %11 = add i64 %10, 17592186044416 - %12 = inttoptr i64 %11 to i32* - store i32 -235802127, i32* %12 - %13 = add i64 %11, 4 - %14 = inttoptr i64 %13 to i32* - store i32 -185273344, i32* %14 - %15 = add i64 %11, 8 - %16 = inttoptr i64 %15 to i32* - store i32 -202116109, i32* %16 - call void @llvm.dbg.declare(metadata !{%class.A* %0}, metadata !47), !dbg !48 - %17 = ptrtoint i8** %4 to i64 - %18 = lshr i64 %17, 3 - %19 = add i64 %18, 17592186044416 - %20 = inttoptr i64 %19 to i8* - %21 = load i8* %20 - %22 = icmp ne i8 %21, 0 - call void @llvm.dbg.declare(metadata !{i8** %4}, metadata !49) - br i1 %22, label %23, label %24 + %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* %19 + %21 = icmp ne i8 %20, 0 + call void @llvm.dbg.declare(metadata !{i32* %3}, metadata !23) + br i1 %21, label %22, label %28 -;