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 tests. NFC
[llvm-complete.git]
/
test
/
Transforms
/
InstSimplify
/
2010-12-20-Boolean.ll
blob
33f2176f7c91b2a42f3c99f1d77856d0a05a16b2
1
; NOTE: Assertions have been autogenerated by update_test_checks.py
2
; RUN: opt < %s -instsimplify -S | FileCheck %s
3
4
define i1 @add(i1 %x) {
5
; CHECK-LABEL: @add(
6
; CHECK: ret i1 false
7
;
8
%z = add i1 %x, %x
9
ret i1 %z
10
}
11
12
define i1 @sub(i1 %x) {
13
; CHECK-LABEL: @sub(
14
; CHECK: ret i1 %x
15
;
16
%z = sub i1 false, %x
17
ret i1 %z
18
}
19
20
define i1 @mul(i1 %x) {
21
; CHECK-LABEL: @mul(
22
; CHECK: ret i1 %x
23
;
24
%z = mul i1 %x, %x
25
ret i1 %z
26
}
27
28
define i1 @ne(i1 %x) {
29
; CHECK-LABEL: @ne(
30
; CHECK: ret i1 %x
31
;
32
%z = icmp ne i1 %x, 0
33
ret i1 %z
34
}