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
Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git]
/
llvm
/
test
/
Transforms
/
InstSimplify
/
2010-12-20-Boolean.ll
blob
4a6134f6ec7498120e457f6af6e094b3491d9e7b
1
; NOTE: Assertions have been autogenerated by update_test_checks.py
2
; RUN: opt < %s -passes=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
}