summaryrefslogtreecommitdiff
path: root/test/CodeGen/XCore
diff options
context:
space:
mode:
authorRichard Osborne <richard@xmos.com>2011-01-31 17:41:44 +0000
committerRichard Osborne <richard@xmos.com>2011-01-31 17:41:44 +0000
commit4e3740ee6ddfc5895061245364de21e3f73517fe (patch)
treef6c7135d55a72babcac2a2f2a4b920878d39cb40 /test/CodeGen/XCore
parente85dcb54d1a2bb957a430212b1f2b1c88553878a (diff)
downloadllvm-4e3740ee6ddfc5895061245364de21e3f73517fe.tar.gz
llvm-4e3740ee6ddfc5895061245364de21e3f73517fe.tar.bz2
llvm-4e3740ee6ddfc5895061245364de21e3f73517fe.tar.xz
Fix bug where ReduceLoadWidth was creating illegal ZEXTLOAD instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124587 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/XCore')
-rw-r--r--test/CodeGen/XCore/2011-01-31-DAGCombineBug.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/XCore/2011-01-31-DAGCombineBug.ll b/test/CodeGen/XCore/2011-01-31-DAGCombineBug.ll
new file mode 100644
index 0000000000..f8fe0d2136
--- /dev/null
+++ b/test/CodeGen/XCore/2011-01-31-DAGCombineBug.ll
@@ -0,0 +1,10 @@
+; RUN: llc < %s -march=xcore
+%struct.st = type <{ i8, i32, i8, i32, i8, i32 }>
+
+@x = external global %struct.st, align 4
+
+define i32 @test_entry() nounwind {
+entry:
+ %0 = load i32* getelementptr inbounds (%struct.st* @x, i32 0, i32 3), align 2
+ ret i32 %0
+}