annotate test/Transforms/InstCombine/early_dce_clobbers_callgraph.ll @ 121:803732b1fca8

LLVM 5.0
author kono
date Fri, 27 Oct 2017 17:07:41 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 ; RUN: opt < %s -inline -instcombine -S | FileCheck %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 ; This test case exposed a bug in instcombine where the early
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 ; DCE of a call wasn't recognized as changing the IR.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5 ; So when runOnFunction propagated the "made changes" upwards
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 ; to the CallGraphSCCPass it signalled that no changes had been
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 ; made, so CallGraphSCCPass assumed that the old CallGraph,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 ; as known by that pass manager, still was up-to-date.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 ;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 ; This was detected as an assert when trying to remove the
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 ; no longer used function 'bar' (due to incorrect reference
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 ; count in the CallGraph).
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 attributes #0 = { noinline norecurse nounwind readnone }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 define void @foo() #0 {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17 ; CHECK-LABEL: @foo(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 ; CHECK-NEXT: entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 ; CHECK-NEXT: ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 ;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 %call = call i32 @bar()
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26 define internal i32 @bar() #0 {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27 ; CHECK-NOT: bar
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 ret i32 42
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31