mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-12-19 11:23:32 +00:00
Don't try to pull vector bitcasts that change the number of elements through
a select. A vector select is pairwise on each element so we'd need a new condition with the right number of elements to select on. Fixes PR8994. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123963 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -689,3 +689,14 @@ define i64 @test50(i32 %a) nounwind {
|
||||
; CHECK-NEXT: %min = select i1 %is_a_nonpositive, i64 %a_ext, i64 2
|
||||
; CHECK-NEXT: ret i64 %min
|
||||
}
|
||||
|
||||
; PR8994
|
||||
|
||||
; Theis select instruction can't be eliminated because trying to do so would
|
||||
; change the number of vector elements. This used to assert.
|
||||
define i48 @test51(<3 x i1> %icmp, <3 x i16> %tmp) {
|
||||
%select = select <3 x i1> %icmp, <3 x i16> zeroinitializer, <3 x i16> %tmp
|
||||
; CHECK: select <3 x i1>
|
||||
%tmp2 = bitcast <3 x i16> %select to i48
|
||||
ret i48 %tmp2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user