projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
85ad36b
)
[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)
llvm-svn: 289895
llvm/test/Transforms/InstCombine/fls.ll
patch
|
blob
|
history
diff --git
a/llvm/test/Transforms/InstCombine/fls.ll
b/llvm/test/Transforms/InstCombine/fls.ll
index
bf608b3
..
9ccc56a
100644
(file)
--- a/
llvm/test/Transforms/InstCombine/fls.ll
+++ b/
llvm/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)