aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-02-07 19:07:25 +0000
committerChris Lattner <sabre@nondot.org>2006-02-07 19:07:25 +0000
commit78ee0addedb6ae3c655495e9dc1ec09928250c9a (patch)
tree30b97adde7865c5901f41ba90812a64839ee34d2 /test
parent2338c5cb0e7c102ae2269d9a6b6e3d620ed206da (diff)
downloadexternal_llvm-78ee0addedb6ae3c655495e9dc1ec09928250c9a.zip
external_llvm-78ee0addedb6ae3c655495e9dc1ec09928250c9a.tar.gz
external_llvm-78ee0addedb6ae3c655495e9dc1ec09928250c9a.tar.bz2
new testcase that caused instcombine to crash on 176.gcc last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/2006-02-07-SextZextCrash.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2006-02-07-SextZextCrash.ll b/test/Transforms/InstCombine/2006-02-07-SextZextCrash.ll
new file mode 100644
index 0000000..f3591e6
--- /dev/null
+++ b/test/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 ; <uint*> [#uses=1]
+ %tmp.56 = getelementptr %struct.rtx_def* %x, int 0, uint 0 ; <int*> [#uses=1]
+ %tmp.57 = load int* %tmp.56 ; <int> [#uses=1]
+ %tmp.58 = shl int %tmp.57, ubyte 8 ; <int> [#uses=1]
+ %tmp.59 = shr int %tmp.58, ubyte 24 ; <int> [#uses=1]
+ %tmp.60 = cast int %tmp.59 to ushort ; <ushort> [#uses=1]
+ %tmp.61 = cast ushort %tmp.60 to uint ; <uint> [#uses=1]
+ %tmp.62 = shl uint %tmp.61, ubyte 16 ; <uint> [#uses=1]
+ %tmp.65 = or uint 0, %tmp.62 ; <uint> [#uses=1]
+ store uint %tmp.65, uint* %tmp.54
+ ret void
+}