1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/test/Transforms/InstSimplify/dead-code-removal.ll
Gerolf Hoflehner 13cf626de6 RecursivelyDeleteTriviallyDeadInstructions() could remove
more than 1 instruction. The caller need to be aware of this
and adjust instruction iterators accordingly.

rdar://16679376

Repaired r207302.

llvm-svn: 207309
2014-04-26 05:58:11 +00:00

16 lines
371 B
LLVM

; RUN: opt -instsimplify -S < %s | FileCheck %s
define void @foo() nounwind {
br i1 undef, label %1, label %4
; <label>:1 ; preds = %1, %0
; CHECK-NOT: phi
; CHECK-NOT: sub
%2 = phi i32 [ %3, %1 ], [ undef, %0 ]
%3 = sub i32 0, undef
br label %1
; <label>:4 ; preds = %0
ret void
}