projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
ARM64: add patterns for csXYZ with reversed operands.
[oota-llvm.git]
/
test
/
Transforms
/
InstSimplify
/
2010-12-20-Boolean.ll
1
; RUN: opt < %s -instsimplify -S | FileCheck %s
2
3
define i1 @add(i1 %x) {
4
; CHECK-LABEL: @add(
5
%z = add i1 %x, %x
6
ret i1 %z
7
; CHECK: ret i1 false
8
}
9
10
define i1 @sub(i1 %x) {
11
; CHECK-LABEL: @sub(
12
%z = sub i1 false, %x
13
ret i1 %z
14
; CHECK: ret i1 %x
15
}
16
17
define i1 @mul(i1 %x) {
18
; CHECK-LABEL: @mul(
19
%z = mul i1 %x, %x
20
ret i1 %z
21
; CHECK: ret i1 %x
22
}
23
24
define i1 @ne(i1 %x) {
25
; CHECK-LABEL: @ne(
26
%z = icmp ne i1 %x, 0
27
ret i1 %z
28
; CHECK: ret i1 %x
29
}