Fix PR10104 by adding a bounds check on a vector element access check. It was

assuming that all offsets are legal vector accesses, and thus trying to access
the float member of { <2 x float>, float } as the 3rd element of the first
member.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132766 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Cameron Zwarich
2011-06-09 01:45:33 +00:00
parent efe12907dd
commit 96cc1d0dfb
2 changed files with 9 additions and 4 deletions

View File

@@ -41,9 +41,11 @@ entry:
; CHECK: test2
; CHECK-NOT: alloca
; CHECK: insertelement <2 x float> zeroinitializer
; CHECK: extractelement <2 x float> %tmp2
; CHECK: extractelement <2 x float> %tmp2
; CHECK: and i128
; CHECK: or i128
; CHECK: trunc i128
; CHECK-NOT: insertelement
; CHECK-NOT: extractelement
define float @test2() uwtable ssp {
entry: