xref: /llvm-project/llvm/test/Transforms/SROA/assume.ll (revision 4f7e5d22060e8a89237ffb93c3e7be6e92fee8fe)
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; RUN: opt < %s -passes='sroa<preserve-cfg>' -S | FileCheck %s --check-prefixes=CHECK,CHECK-PRESERVE-CFG
3; RUN: opt < %s -passes='sroa<modify-cfg>' -S | FileCheck %s --check-prefixes=CHECK,CHECK-MODIFY-CFG
4
5target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
6target triple = "x86_64-unknown-linux-gnu"
7
8%struct.n.2 = type { i8 }
9%struct.bi = type { %class.as }
10%class.as = type { %class.ao }
11%class.ao = type { %class.ai }
12%class.ai = type { i32, i32 }
13
14define void @_ZN2bg2baIiEC2ES_(i64 %v) {
15; CHECK-LABEL: @_ZN2bg2baIiEC2ES_(
16; CHECK-NEXT:  entry:
17; CHECK-NEXT:    call void @llvm.assume(i1 true) [ "ignore"(ptr undef) ]
18; CHECK-NEXT:    ret void
19;
20entry:
21  %y = alloca i64, align 8
22  store i64 %v, ptr %y, align 8
23  call void @llvm.assume(i1 true) [ "nonnull"(ptr %y) ]
24  ret void
25}
26
27; Function Attrs: nofree norecurse nounwind willreturn
28declare void @llvm.assume(i1) #0
29
30attributes #0 = { nofree norecurse nounwind willreturn }
31;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
32; CHECK-MODIFY-CFG: {{.*}}
33; CHECK-PRESERVE-CFG: {{.*}}
34