@@ -3093,6 +3093,32 @@ define <2 x i32> @dec_zext_add_nonzero_vec(<2 x i8> %x) {
30933093 ret <2 x i32 > %c
30943094}
30953095
3096+ define <2 x i32 > @dec_zext_add_nonzero_vec_undef0 (<2 x i8 > %x ) {
3097+ ; CHECK-LABEL: @dec_zext_add_nonzero_vec_undef0(
3098+ ; CHECK-NEXT: [[O:%.*]] = or <2 x i8> [[X:%.*]], <i8 8, i8 undef>
3099+ ; CHECK-NEXT: [[C:%.*]] = zext <2 x i8> [[O]] to <2 x i32>
3100+ ; CHECK-NEXT: ret <2 x i32> [[C]]
3101+ ;
3102+ %o = or <2 x i8 > %x , <i8 8 , i8 undef >
3103+ %a = add <2 x i8 > %o , <i8 -1 , i8 -1 >
3104+ %b = zext <2 x i8 > %a to <2 x i32 >
3105+ %c = add <2 x i32 > %b , <i32 1 , i32 1 >
3106+ ret <2 x i32 > %c
3107+ }
3108+
3109+ define <2 x i32 > @dec_zext_add_nonzero_poison0 (<2 x i8 > %x ) {
3110+ ; CHECK-LABEL: @dec_zext_add_nonzero_poison0(
3111+ ; CHECK-NEXT: [[O:%.*]] = or <2 x i8> [[X:%.*]], <i8 8, i8 poison>
3112+ ; CHECK-NEXT: [[C:%.*]] = zext <2 x i8> [[O]] to <2 x i32>
3113+ ; CHECK-NEXT: ret <2 x i32> [[C]]
3114+ ;
3115+ %o = or <2 x i8 > %x , <i8 8 , i8 poison>
3116+ %a = add <2 x i8 > %o , <i8 -1 , i8 -1 >
3117+ %b = zext <2 x i8 > %a to <2 x i32 >
3118+ %c = add <2 x i32 > %b , <i32 1 , i32 1 >
3119+ ret <2 x i32 > %c
3120+ }
3121+
30963122define <2 x i32 > @dec_zext_add_nonzero_vec_poison1 (<2 x i8 > %x ) {
30973123; CHECK-LABEL: @dec_zext_add_nonzero_vec_poison1(
30983124; CHECK-NEXT: [[O:%.*]] = or <2 x i8> [[X:%.*]], <i8 8, i8 8>
0 commit comments