The following IR causes SROA to assert a failure. Verified this on a trunk build with asserts on. opt test.ll -sroa target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n8:16:32:64" define <4 x i1> @vector_bitcast() { ; CHECK-LABEL: @vector_bitcast %a = alloca <3 x i1> store <3 x i1> <i1 1,i1 0,i1 1>, <3 x i1>* %a %cast = bitcast <3 x i1>* %a to <4 x i1>* %vec = load <4 x i1>, <4 x i1>* %cast ret <4 x i1> %vec }
Should be fixed by https://reviews.llvm.org/D66790
Fixed by https://reviews.llvm.org/rL372480
Reopening to track merging to 9.0.1.
Chandler, are you OK with merging this? https://reviews.llvm.org/rL372480
(In reply to Tom Stellard from comment #4) > Chandler, are you OK with merging this? > > https://reviews.llvm.org/rL372480 LGTM for merge (sorry for delay seeing this).
Merged: f2c8771