repo.or.cz
/
llvm-complete.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[InstCombine] Signed saturation patterns
[llvm-complete.git]
/
test
/
Transforms
/
ConstProp
/
div-zero.ll
blob
f4049a9615a8a5832ba277bdbf420f459b29d6aa
1
; RUN: opt < %s -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 (i32* getelementptr (i32, i32* null,
9
i32 1) to i32) ; <i32> [#uses=1]
10
ret i32 %div_zero
11
}
12