Home | History | Annotate | Download | only in PhaseOrdering
      1 ; RUN: opt -O3 -S %s | FileCheck %s
      2 
      3 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"
      4 target triple = "x86_64-apple-macosx10.6.7"
      5 
      6 declare i8* @malloc(i64)
      7 declare void @free(i8*)
      8 
      9 
     10 ; PR2338
     11 define void @test1() nounwind ssp {
     12   %retval = alloca i32, align 4
     13   %i = alloca i8*, align 8
     14   %call = call i8* @malloc(i64 1)
     15   store i8* %call, i8** %i, align 8
     16   %tmp = load i8** %i, align 8
     17   store i8 1, i8* %tmp
     18   %tmp1 = load i8** %i, align 8
     19   call void @free(i8* %tmp1)
     20   ret void
     21 
     22 ; CHECK: @test1
     23 ; CHECK-NEXT: ret void
     24 }
     25