From 272e084bca2f151c7af390ae1acc45b18b495a91 Mon Sep 17 00:00:00 2001 From: Richard Osborne Date: Mon, 31 Jan 2011 17:41:44 +0000 Subject: Fix bug where ReduceLoadWidth was creating illegal ZEXTLOAD instructions. llvm-svn: 124587 --- llvm/test/CodeGen/XCore/2011-01-31-DAGCombineBug.ll | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 llvm/test/CodeGen/XCore/2011-01-31-DAGCombineBug.ll (limited to 'llvm/test/CodeGen/XCore') diff --git a/llvm/test/CodeGen/XCore/2011-01-31-DAGCombineBug.ll b/llvm/test/CodeGen/XCore/2011-01-31-DAGCombineBug.ll new file mode 100644 index 00000000000..f8fe0d2136f --- /dev/null +++ b/llvm/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 +} -- cgit v1.2.3