1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
4 target datalayout = "e-p:32:32"
5 target triple = "i686-pc-linux-gnu"
8 declare ptr @ctime2(ptr)
10 define ptr @ctime(ptr) {
11 ; CHECK-LABEL: @ctime(
13 ; CHECK-NEXT: [[I0:%.*]] = call i32 @main2()
14 ; CHECK-NEXT: [[TMP1:%.*]] = inttoptr i32 [[I0]] to ptr
15 ; CHECK-NEXT: ret ptr [[TMP1]]
18 %i0 = call ptr @main2( )
25 ; CHECK-NEXT: [[I1:%.*]] = call ptr @ctime2(ptr null)
26 ; CHECK-NEXT: [[TMP0:%.*]] = ptrtoint ptr [[I1]] to i32
27 ; CHECK-NEXT: ret i32 [[TMP0]]
30 %i1 = call i32 @ctime2( ptr null )