Swift triggers an assert in the copy elision code now. We believe this to be cause by i1 parameters. I was able to craft a small reproducer: target triple = "x86_64-apple-macosx" @g = common global i8* null, align 8 define void @foo(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %a4, i32 %a5, i1 %a6) { %tmp = alloca i1, align 4 store i1 %a6, i1* %tmp, align 4 %ptr = bitcast i1* %tmp to i8* store i8* %ptr, i8** @g, align 8 ret void }
I disabled the copy elision optimization for illegal types in r296950.
I did this a different way in r297045, I think we just needed to use the store size instead of the bit size divided by 8. This also re-enables copy elision from i64s.
Thanks for the quick workaround!
Thanks for the proper fix! :)