2 ; RUN: opt -S -instsimplify -hotcoldsplit -debug < %s 2>&1 | FileCheck %s
3 ; RUN: opt -instcombine -hotcoldsplit -instsimplify %s -o /dev/null
5 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
6 target triple = "aarch64"
12 ; CHECK-LABEL: codeRepl:
13 ; CHECK-NOT: @llvm.assume
15 ; CHECK: declare {{.*}}@llvm.assume
16 ; CHECK: define {{.*}}@f.cold.1(i64 %0)
17 ; CHECK-LABEL: newFuncRoot:
18 ; CHECK: %1 = icmp eq i64 %0, 0
19 ; CHECK: call void @llvm.assume(i1 %1)
23 %0 = getelementptr inbounds %a, %a* null, i64 0, i32 1
27 %1 = bitcast i64* %0 to %b**
28 %2 = load %b*, %b** %1, align 8
29 %3 = getelementptr inbounds %b, %b* %2, i64 undef, i32 0
30 %4 = load i64, i64* %3, align 8
31 %5 = icmp ugt i64 %4, 1
32 br i1 %5, label %if.then, label %if.else
38 call void @g(i8* undef)
39 %6 = load i64, i64* undef, align 8
41 %8 = inttoptr i64 %7 to i8*
42 %9 = icmp eq i64 %4, 0
43 call void @llvm.assume(i1 %9)
49 declare void @llvm.assume(i1)