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:
031a112
)
Test cases for when casts to bool can be eliminated
author
Chris Lattner
<sabre@nondot.org>
Mon, 23 Jun 2003 21:48:26 +0000
(21:48 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 23 Jun 2003 21:48:26 +0000
(21:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6870
91177308
-0d34-0410-b5e6-
96231b3b80d8
test/Transforms/InstCombine/cast.ll
patch
|
blob
|
history
diff --git
a/test/Transforms/InstCombine/cast.ll
b/test/Transforms/InstCombine/cast.ll
index
ac92b95
..
2ef6240
100644
(file)
--- a/
test/Transforms/InstCombine/cast.ll
+++ b/
test/Transforms/InstCombine/cast.ll
@@
-68,3
+68,16
@@
short %test10(short %A) {
%c2 = cast uint %c1 to short
ret short %c2
}
+
+bool %test11(ubyte %A, ubyte %B) {
+ %C = sub ubyte %A, %B
+ %D = cast ubyte %C to bool ; == setne A, B
+ ret bool %D
+}
+
+bool %test12(ubyte %A) {
+ %B = add ubyte %A, 255
+ %C = cast ubyte %B to bool ; === A != 1
+ ret bool %C
+}
+