aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/CodeGen/Generic/select.ll12
-rw-r--r--test/LLC/select.ll12
2 files changed, 24 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/select.ll b/test/CodeGen/Generic/select.ll
index 222fd36954..db71355469 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
diff --git a/test/LLC/select.ll b/test/LLC/select.ll
index 222fd36954..db71355469 100644
--- a/test/LLC/select.ll
+++ b/test/LLC/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