repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[rtsan] Add fork/execve interceptors (#117198)
[llvm-project.git]
/
llvm
/
test
/
Transforms
/
InstSimplify
/
ConstProp
/
div-zero.ll
blob
842b45be184c12bd172dfdaa3ca2649535b0648b
1
; RUN: opt < %s -passes=instcombine -S | grep "ret i32 0"
2
; PR4424
3
declare void @ext()
4
5
define i32 @foo(i32 %ptr) {
6
entry:
7
%zero = sub i32 %ptr, %ptr ; <i32> [#uses=1]
8
%div_zero = sdiv i32 %zero, ptrtoint (ptr getelementptr (i32, ptr null,
9
i32 1) to i32) ; <i32> [#uses=1]
10
ret i32 %div_zero
11
}
12