repo.or.cz
/
llvm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix a globalopt crash on two Adobe-C++ testcases that the recent
[llvm.git]
/
test
/
Transforms
/
ConstProp
/
div-zero.ll
blob
f78a34fe703d6d83120e62ab9d5ce73b4202aee5
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* null,
9
i32 1) to i32) ; <i32> [#uses=1]
10
ret i32 %div_zero
11
}
12