projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[objc-arc] Ensure that the cfg path count does not overflow when we multiply TopDownP...
[oota-llvm.git]
/
test
/
Transforms
/
InstSimplify
/
AndOrXor.ll
1
; RUN: opt < %s -instsimplify -S | FileCheck %s
2
3
define i64 @pow2(i32 %x) {
4
; CHECK: @pow2
5
%negx = sub i32 0, %x
6
%x2 = and i32 %x, %negx
7
%e = zext i32 %x2 to i64
8
%nege = sub i64 0, %e
9
%e2 = and i64 %e, %nege
10
ret i64 %e2
11
; CHECK: ret i64 %e
12
}
13
14
define i64 @pow2b(i32 %x) {
15
; CHECK: @pow2b
16
%sh = shl i32 2, %x
17
%e = zext i32 %sh to i64
18
%nege = sub i64 0, %e
19
%e2 = and i64 %e, %nege
20
ret i64 %e2
21
; CHECK: ret i64 %e
22
}