All the details are essentially here: https://llvm.godbolt.org/z/6G69aaEP3
target triple = "arm64-apple-ios27.0.0"
declare void @c1()
declare <2 x i16> @c2()
declare void @c3(i64)
declare void @c4(i64)
define i32 @f(ptr %0) personality ptr null {
invoke void @c1()
to label %4 unwind label %2
common.ret:
%common.ret.op = phi i32 [ 0, %2 ], [ 0, %6 ]
ret i32 %common.ret.op
2:
%3 = landingpad { ptr, i32 } cleanup
br label %common.ret
4:
%5 = invoke <2 x i16> @c2()
to label %6 unwind label %2
6:
%7 = extractelement <2 x i16> %5, i64 0
%8 = or i16 %7, 1
%9 = zext i16 %8 to i64
%10 = extractelement <2 x i16> %5, i64 1
%11 = or i16 %10, 1
%12 = zext i16 %11 to i64
%13 = mul i64 %9, %12
call void @c4(i64 %13)
%14 = zext i16 %10 to i64
call void @c3(i64 %14)
%15 = zext i16 %7 to i64
store i64 %15, ptr %0, align 8
%16 = getelementptr i8, ptr %0, i64 8
store i64 %14, ptr %16, align 8
br label %common.ret
}
After SLP we get:
%5 = invoke <2 x i16> @c2()
- to label %6 unwind label %2
+ to label %7 unwind label %2
+ %6 = extractelement <2 x i16> %5, i64 1
leaving BB 4 with a dangling instruction after a terminator.
All the details are essentially here: https://llvm.godbolt.org/z/6G69aaEP3
After SLP we get:
leaving BB 4 with a dangling instruction after a terminator.