1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
llvm-mirror/test/Transforms/Reassociate/erase_inst_made_change.ll
Eric Christopher a62270de2c Revert "Temporarily Revert "Add basic loop fusion pass.""
The reversion apparently deleted the test/Transforms directory.

Will be re-reverting again.

llvm-svn: 358552
2019-04-17 04:52:47 +00:00

30 lines
799 B
LLVM

; RUN: opt < %s -inline -reassociate -S | FileCheck %s
; This test case exposed a bug in reassociate where EraseInst's
; removal of a dead call wasn't recognized as changing the IR.
; So when runOnFunction propagated the "made changes" upwards
; to the CallGraphSCCPass it signalled that no changes had been
; made, so CallGraphSCCPass assumed that the old CallGraph,
; as known by that pass manager, still was up-to-date.
;
; This was detected as an assert when trying to remove the
; no longer used function 'bar' (due to incorrect reference
; count in the CallGraph).
define void @foo() {
; CHECK-LABEL: @foo(
; CHECK-NEXT: entry:
; CHECK-NEXT: ret void
entry:
call void @bar()
ret void
}
define internal void @bar() noinline nounwind readnone {
; CHECK-NOT: bar
entry:
ret void
}