2 ; RUN: opt -S -instsimplify -hotcoldsplit -hotcoldsplit-threshold=-1 -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()
17 ; CHECK-LABEL: newFuncRoot:
19 ; CHECK: define {{.*}}@f.cold.2(i64 %0)
20 ; CHECK-LABEL: newFuncRoot:
21 ; CHECK: %1 = icmp eq i64 %0, 0
22 ; CHECK-NOT: call void @llvm.assume
26 %0 = getelementptr inbounds %a, %a* null, i64 0, i32 1
30 %1 = bitcast i64* %0 to %b**
31 %2 = load %b*, %b** %1, align 8
32 %3 = getelementptr inbounds %b, %b* %2, i64 undef, i32 0
33 %4 = load i64, i64* %3, align 8
34 %5 = icmp ugt i64 %4, 1
35 br i1 %5, label %if.then, label %if.else
41 call void @g(i8* undef)
42 %6 = load i64, i64* undef, align 8
44 %8 = inttoptr i64 %7 to i8*
45 %9 = icmp eq i64 %4, 0
46 call void @llvm.assume(i1 %9)
52 declare void @llvm.assume(i1)