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
[SLP] Add cost model for `llvm.powi.*` intrinsics
[llvm-project.git]
/
llvm
/
test
/
Transforms
/
InstSimplify
/
ConstProp
/
div-zero.ll
blob
22b4d8e35f2ebba6a7555f3ad847b0424b92b5cd
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 (ptr getelementptr (i32, ptr null,
9
i32 1) to i32) ; <i32> [#uses=1]
10
ret i32 %div_zero
11
}
12