; RUN: opt -tut-simplifycfg -tut-simplifycfg-version=v2 -enable-new-pm=0 -S < %s | FileCheck %s
; RUN: opt -tut-simplifycfg -tut-simplifycfg-version=v3 -enable-new-pm=0 -S < %s | FileCheck %s
-define i8* @simp1(i32 %x) {
+define ptr @simp1(i32 %x) {
; CHECK-LABEL: @simp1(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[X:%.*]], 42
-; CHECK-NEXT: [[ADDR:%.*]] = select i1 [[CMP]], i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)
-; CHECK-NEXT: ret i8* [[ADDR]]
+; CHECK-NEXT: [[ADDR:%.*]] = select i1 [[CMP]], ptr inttoptr (i32 1 to ptr), ptr inttoptr (i32 1 to ptr)
+; CHECK-NEXT: ret ptr [[ADDR]]
;
entry:
%cmp = icmp slt i32 %x, 42
- %addr = select i1 %cmp, i8* blockaddress(@simp1, %bb1), i8* blockaddress(@simp1, %bb2)
- ret i8* %addr
+ %addr = select i1 %cmp, ptr blockaddress(@simp1, %bb1), ptr blockaddress(@simp1, %bb2)
+ ret ptr %addr
bb1:
- ret i8* null
+ ret ptr null
bb2:
- ret i8* null
+ ret ptr null
}