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:
1c93e5b
)
Add new testcase for gep instruction -> get constexpr promotion
author
Chris Lattner
<sabre@nondot.org>
Fri, 16 Aug 2002 21:18:21 +0000
(21:18 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 16 Aug 2002 21:18:21 +0000
(21:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3364
91177308
-0d34-0410-b5e6-
96231b3b80d8
test/Transforms/InstCombine/getelementptr.ll
patch
|
blob
|
history
diff --git
a/test/Transforms/InstCombine/getelementptr.ll
b/test/Transforms/InstCombine/getelementptr.ll
index 15795093723e584242fa1a9fcee78f6f78de28fe..2a482ed0a356ea94c9895c823c0269d990d413f8 100644
(file)
--- a/
test/Transforms/InstCombine/getelementptr.ll
+++ b/
test/Transforms/InstCombine/getelementptr.ll
@@
-5,6
+5,8
@@
; RUN: else exit 0
; RUN: fi
+%Global = constant [10 x sbyte] c"helloworld"
+
implementation
int *"foo1"(int * %I) { ; Test noop elimination
@@
-27,3
+29,9
@@
int* %foo4({int} *%I) { ; Test that two getelementptr insts fold
%B = getelementptr {int}* %A, uint 0, ubyte 0
ret int* %B
}
+
+sbyte * %foo5() {
+ ; This should be turned into a constexpr instead of being an instruction
+ %A = getelementptr [10 x sbyte]* %Global, uint 0, uint 4
+ ret sbyte* %A
+}