mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
Fix another assert failure very similar to PR16651's test case. This
test case came from Benjamin and found the parallel bug in the vector promotion code. llvm-svn: 186666
This commit is contained in:
parent
504c4b0e6a
commit
5d65964bbf
@ -1539,6 +1539,8 @@ static bool isVectorPromotionViableForSlice(
|
|||||||
}
|
}
|
||||||
if (!canConvertValue(DL, STy, SliceTy))
|
if (!canConvertValue(DL, STy, SliceTy))
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1318,12 +1318,12 @@ define void @PR15805(i1 %a, i1 %b) {
|
|||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
define void @PR16651(i8* %a) {
|
define void @PR16651.1(i8* %a) {
|
||||||
; This test case caused a crash due to the volatile memcpy in combination with
|
; This test case caused a crash due to the volatile memcpy in combination with
|
||||||
; lowering to integer loads and stores of a width other than that of the original
|
; lowering to integer loads and stores of a width other than that of the original
|
||||||
; memcpy.
|
; memcpy.
|
||||||
;
|
;
|
||||||
; CHECK-LABEL: @PR16651(
|
; CHECK-LABEL: @PR16651.1(
|
||||||
; CHECK: alloca i16
|
; CHECK: alloca i16
|
||||||
; CHECK: alloca i8
|
; CHECK: alloca i8
|
||||||
; CHECK: alloca i8
|
; CHECK: alloca i8
|
||||||
@ -1337,3 +1337,23 @@ entry:
|
|||||||
load i8* %b.gep, align 2
|
load i8* %b.gep, align 2
|
||||||
unreachable
|
unreachable
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define void @PR16651.2() {
|
||||||
|
; This test case caused a crash due to failing to promote given a select that
|
||||||
|
; can't be speculated. It shouldn't be promoted, but we missed that fact when
|
||||||
|
; analyzing whether we could form a vector promotion because that code didn't
|
||||||
|
; bail on select instructions.
|
||||||
|
;
|
||||||
|
; CHECK-LABEL: @PR16651.2(
|
||||||
|
; CHECK: alloca <2 x float>
|
||||||
|
; CHECK: ret void
|
||||||
|
|
||||||
|
entry:
|
||||||
|
%tv1 = alloca { <2 x float>, <2 x float> }, align 8
|
||||||
|
%0 = getelementptr { <2 x float>, <2 x float> }* %tv1, i64 0, i32 1
|
||||||
|
store <2 x float> undef, <2 x float>* %0, align 8
|
||||||
|
%1 = getelementptr inbounds { <2 x float>, <2 x float> }* %tv1, i64 0, i32 1, i64 0
|
||||||
|
%cond105.in.i.i = select i1 undef, float* null, float* %1
|
||||||
|
%cond105.i.i = load float* %cond105.in.i.i, align 8
|
||||||
|
ret void
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user