projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cb170c
)
Add tests for casts that should be eliminated
author
Chris Lattner
<sabre@nondot.org>
Mon, 23 Feb 2004 07:16:03 +0000
(07:16 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 23 Feb 2004 07:16:03 +0000
(07:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11741
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 53e2c2e25de02d50df504f4fd7d656721cd6e7e5..be9f6085a47e70a0b977fad0ad7f673db48f2b84 100644
(file)
--- a/
test/Transforms/InstCombine/cast.ll
+++ b/
test/Transforms/InstCombine/cast.ll
@@
-82,8
+82,20
@@
int* %test12() {
ret int* %c
}
-
ubyte *%test13(long %A) {
%c = getelementptr [0 x ubyte]* cast ([32832 x ubyte]* %inbuf to [0 x ubyte]*), long 0, long %A
ret ubyte* %c
}
+
+bool %test14(sbyte %A) {
+ %B = cast sbyte %A to ubyte
+ %X = setlt ubyte %B, 128 ; setge %A, 0
+ ret bool %X
+}
+
+bool %test15(ubyte %A) {
+ %B = cast ubyte %A to sbyte
+ %X = setlt sbyte %B, 0 ; setgt %A, 127
+ ret bool %X
+}
+