OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d956fc2
)
[SimplifyLibCalls] Add a test to make sure we lower fls(0) correctly.
author
Davide Italiano
<davide@freebsd.org>
Thu, 15 Dec 2016 23:48:07 +0000
(23:48 +0000)
committer
Davide Italiano
<davide@freebsd.org>
Thu, 15 Dec 2016 23:48:07 +0000
(23:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289895
91177308
-0d34-0410-b5e6-
96231b3b80d8
test/Transforms/InstCombine/fls.ll
patch
|
blob
|
history
diff --git
a/test/Transforms/InstCombine/fls.ll
b/test/Transforms/InstCombine/fls.ll
index
bf608b3
..
9ccc56a
100644
(file)
--- a/
test/Transforms/InstCombine/fls.ll
+++ b/
test/Transforms/InstCombine/fls.ll
@@
-43,6
+43,15
@@
define i32 @flsnotconst(i64 %z) {
ret i32 %goo
}
+; Make sure we lower fls(0) to 0 and not to `undef`.
+; CHECK-LABEL: define i32 @flszero(
+; CHECK: ret i32 0
+; CHECK: }
+define i32 @flszero() {
+ %zero = call i32 @fls(i32 0)
+ ret i32 %zero
+}
+
declare i32 @fls(i32)
declare i32 @flsl(i64)
declare i32 @flsll(i64)