mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-15 01:37:53 +00:00
Add new testcase for gep instruction -> get constexpr promotion
llvm-svn: 3364
This commit is contained in:
parent
e63ef1c3ab
commit
f2a93d41f1
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user