1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/test/Transforms/DCE/guards.ll
Sanjoy Das 42c6e9b9ce Mark guards on true as "trivially dead"
This moves some logic added to EarlyCSE in rL268120 into
`llvm::isInstructionTriviallyDead`.  Adds a test case for DCE to
demonstrate that passes other than EarlyCSE can now pick up on the new
information.

llvm-svn: 268126
2016-04-29 22:23:16 +00:00

12 lines
273 B
LLVM

; RUN: opt -dce -S < %s | FileCheck %s
declare void @llvm.experimental.guard(i1,...)
define void @f(i32 %val) {
; CHECK-LABEL: @f(
; CHECK-NEXT: ret void
%val2 = add i32 %val, 1
call void(i1, ...) @llvm.experimental.guard(i1 true) [ "deopt"(i32 %val2) ]
ret void
}