summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-02-28 19:20:56 +0000
committerChris Lattner <sabre@nondot.org>2003-02-28 19:20:56 +0000
commitb03e45f0ff7ba16a9cd7f65d6031cfdccf03fdf3 (patch)
treec27c7e0fe13ef82655566ac579582d929ba4ac30 /llvm
parenta55fad38d90b270a795afb3df184435959fb163c (diff)
downloadbcm5719-llvm-b03e45f0ff7ba16a9cd7f65d6031cfdccf03fdf3.tar.gz
bcm5719-llvm-b03e45f0ff7ba16a9cd7f65d6031cfdccf03fdf3.zip
Add a test for a feature that I hope will be implemented someday
llvm-svn: 5673
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/Regression/Transforms/Mem2Reg/DifferingTypes.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/Mem2Reg/DifferingTypes.ll b/llvm/test/Regression/Transforms/Mem2Reg/DifferingTypes.ll
new file mode 100644
index 00000000000..782deaafc43
--- /dev/null
+++ b/llvm/test/Regression/Transforms/Mem2Reg/DifferingTypes.ll
@@ -0,0 +1,22 @@
+; This is a feature test. Hopefully one day this will be implemented. The
+; generated code should perform the appropriate masking operations required
+; depending on the endianness of the target...
+
+; RUN: if as < %s | opt -mem2reg | dis | grep 'alloca'
+; RUN: then exit 1
+; RUN: else exit 0
+; RUN: fi
+
+implementation
+
+int %testfunc(int %i, sbyte %j) {
+ %I = alloca int
+
+ store int %i, int* %I
+
+ %P = cast int* %I to sbyte*
+ store sbyte %j, sbyte* %P
+
+ %t = load int* %I
+ ret int %t
+}
OpenPOWER on IntegriCloud