diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-10-13 00:44:00 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-10-13 00:44:00 +0000 |
commit | f289911a6cc0b8ed47e1eb2e3609a4eda0f54f97 (patch) | |
tree | 80a097de57c4fb80b6873f91e1910ee75d25feb3 /test/CodeGen/Generic | |
parent | 1632e882f1a4a0a18be5821020a1bd2029656d80 (diff) | |
download | external_llvm-f289911a6cc0b8ed47e1eb2e3609a4eda0f54f97.zip external_llvm-f289911a6cc0b8ed47e1eb2e3609a4eda0f54f97.tar.gz external_llvm-f289911a6cc0b8ed47e1eb2e3609a4eda0f54f97.tar.bz2 |
Add a test for folding a GEP into a load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4139 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Generic')
-rw-r--r-- | test/CodeGen/Generic/select.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/select.ll b/test/CodeGen/Generic/select.ll index 222fd36..db71355 100644 --- a/test/CodeGen/Generic/select.ll +++ b/test/CodeGen/Generic/select.ll @@ -1,5 +1,7 @@ %AConst = constant int 123 +%Domain = type { sbyte*, int, int*, int, int, int*, %Domain* } + implementation ; Test setting values of different constants in registers. @@ -193,3 +195,13 @@ begin ret void end + + +; Test case for folding getelementptr into a load/store +; +int "checkFoldGEP"(%Domain* %D, long %idx) +begin + %reg841 = getelementptr %Domain* %D, long 0, ubyte 2, long %idx + %reg820 = load int* %reg841 + ret int %reg820 +end |