; RUN: opt -instcombine -mtriple=aarch64-linux-gnu -mattr=+sve -S < %s | FileCheck %s ; We shouldn't fold bitcast(insert .., iX %val, i32 0) ; into bitcast(iX %val) for scalable vectors. define @bitcast_of_insert_i8_i16(i16 %val) #0 { ; CHECK-LABEL: @bitcast_of_insert_i8_i16( ; CHECK-NOT: bitcast i16 %val to ; CHECK: bitcast %op2 to entry: %op2 = insertelement undef, i16 %val, i32 0 %0 = bitcast %op2 to ret %0 }