1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=openmp-opt-cgscc < %s | FileCheck %s
4 ; Verify we remove the trivially dead store in a function that is not dead
5 ; (foo) but not in a dead function (dead) when running in cgscc mode.
7 define internal void @dead() {
9 ; CHECK-NEXT: [[A:%.*]] = alloca i32, align 4
10 ; CHECK-NEXT: store i32 0, ptr [[A]], align 4
11 ; CHECK-NEXT: ret void
18 define internal void @foo() {
20 ; CHECK-NEXT: [[A:%.*]] = alloca i32, align 4
21 ; CHECK-NEXT: ret void
28 define internal void @bar() {
30 ; CHECK-NEXT: ret void
38 ; CHECK-NEXT: call void @bar()
39 ; CHECK-NEXT: ret void
45 !llvm.module.flags = !{!0, !1}
47 !0 = !{i32 7, !"openmp", i32 50}
48 !1 = !{i32 7, !"openmp-device", i32 50}