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
When removing a function from the function set and adding it to deferred, we
[llvm.git]
/
test
/
Transforms
/
InstCombine
/
zext-bool-add-sub.ll
blob
11642733acc070034a8a9bb259c57822f39241ab
1
; RUN: opt < %s -instcombine -S | not grep zext
2
3
define i32 @a(i1 %x) {
4
entry:
5
%y = zext i1 %x to i32
6
%res = add i32 %y, 1
7
ret i32 %res
8
}
9
10
define i32 @b(i1 %x) {
11
entry:
12
%y = zext i1 %x to i32
13
%res = add i32 %y, -1
14
ret i32 %res
15
}
16
17
define i32 @c(i1 %x) {
18
entry:
19
%y = zext i1 %x to i32
20
%res = sub i32 0, %y
21
ret i32 %res
22
}
23
24
define i32 @d(i1 %x) {
25
entry:
26
%y = zext i1 %x to i32
27
%res = sub i32 3, %y
28
ret i32 %res
29
}