From ee278d9417cb4aeeffcb97c548855c3853f5e6c9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 7 Feb 2006 19:07:25 +0000 Subject: [PATCH] new testcase that caused instcombine to crash on 176.gcc last night. llvm-svn: 26039 --- .../InstCombine/2006-02-07-SextZextCrash.ll | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 llvm/test/Regression/Transforms/InstCombine/2006-02-07-SextZextCrash.ll diff --git a/llvm/test/Regression/Transforms/InstCombine/2006-02-07-SextZextCrash.ll b/llvm/test/Regression/Transforms/InstCombine/2006-02-07-SextZextCrash.ll new file mode 100644 index 000000000000..f3591e663a81 --- /dev/null +++ b/llvm/test/Regression/Transforms/InstCombine/2006-02-07-SextZextCrash.ll @@ -0,0 +1,22 @@ +; RUN: llvm-as < %s | opt -instcombine -disable-output + + %struct.rtx_const = type { uint, { %union.real_extract } } + %struct.rtx_def = type { int, [1 x %union.rtunion_def] } + %union.real_extract = type { double } + %union.rtunion_def = type { uint } + +implementation ; Functions: + +fastcc void %decode_rtx_const(%struct.rtx_def* %x, %struct.rtx_const* %value) { + %tmp.54 = getelementptr %struct.rtx_const* %value, int 0, uint 0 ; [#uses=1] + %tmp.56 = getelementptr %struct.rtx_def* %x, int 0, uint 0 ; [#uses=1] + %tmp.57 = load int* %tmp.56 ; [#uses=1] + %tmp.58 = shl int %tmp.57, ubyte 8 ; [#uses=1] + %tmp.59 = shr int %tmp.58, ubyte 24 ; [#uses=1] + %tmp.60 = cast int %tmp.59 to ushort ; [#uses=1] + %tmp.61 = cast ushort %tmp.60 to uint ; [#uses=1] + %tmp.62 = shl uint %tmp.61, ubyte 16 ; [#uses=1] + %tmp.65 = or uint 0, %tmp.62 ; [#uses=1] + store uint %tmp.65, uint* %tmp.54 + ret void +}