projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
543bd21238e813e5bba5c239ed403f374ac2fd4d
[oota-llvm.git]
/
test
/
Transforms
/
InstCombine
/
div.ll
1
; This test makes sure that div instructions are properly eliminated.
2
;
3
4
; RUN: as < %s | opt -instcombine | dis | not grep div
5
6
implementation
7
8
int %test1(int %A) {
9
%B = div int %A, 1
10
ret int %B
11
}
12
13
uint %test2(uint %A) {
14
%B = div uint %A, 8 ; => Shift
15
ret int %B
16
}
17
18
int %test3(int %A) {
19
%B = div int 0, %A ; => 0, don't need to keep traps
20
ret int %B
21
}