[safestack] Fix handling of array allocas.
[oota-llvm.git] / test / Transforms / MergeFunc / merge-ptr-and-int.ll
1 ; RUN: opt -S -mergefunc < %s | FileCheck %s
2 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"
3
4
5 declare void @stuff()
6
7 ; CHECK-LABEL: @f0(
8 define void @f0(i64 %p0) {
9 entry:
10   call void @stuff()
11   call void @stuff()
12   call void @stuff()
13   ret void
14 }
15
16 ; CHECK-LABEL: @f1(
17 ; CHECK: ptrtoint i64*
18 ; CHECK: tail call void @f0(i64
19
20 define void @f1(i64* %p0) {
21 entry:
22   call void @stuff()
23   call void @stuff()
24   call void @stuff()
25   ret void
26 }
27