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"
9 ; CHECK-NEXT: ret i32 0
14 define ptr @ctime2(ptr %p) {
15 ; CHECK-LABEL: @ctime2(
16 ; CHECK-NEXT: ret ptr [[P:%.*]]
21 define ptr @ctime(ptr) {
22 ; CHECK-LABEL: @ctime(
24 ; CHECK-NEXT: [[I0:%.*]] = call i32 @main2()
25 ; CHECK-NEXT: [[TMP1:%.*]] = inttoptr i32 [[I0]] to ptr
26 ; CHECK-NEXT: ret ptr [[TMP1]]
29 %i0 = call ptr @main2( )
36 ; CHECK-NEXT: [[I1:%.*]] = call ptr @ctime2(ptr null)
37 ; CHECK-NEXT: [[TMP0:%.*]] = ptrtoint ptr [[I1]] to i32
38 ; CHECK-NEXT: ret i32 [[TMP0]]
41 %i1 = call i32 @ctime2( ptr null )