@@ -1100,3 +1100,29 @@ define <2 x i8> @lowmask_add_splat(<2 x i8> %x, <2 x i8>* %p) {
1100
1100
%r = and <2 x i8 > %a , <i8 32 , i8 32 > ; 0x20
1101
1101
ret <2 x i8 > %r
1102
1102
}
1103
+
1104
+ define <2 x i8 > @lowmask_add_splat_undef (<2 x i8 > %x , <2 x i8 >* %p ) {
1105
+ ; CHECK-LABEL: @lowmask_add_splat_undef(
1106
+ ; CHECK-NEXT: [[A:%.*]] = add <2 x i8> [[X:%.*]], <i8 -64, i8 undef>
1107
+ ; CHECK-NEXT: store <2 x i8> [[A]], <2 x i8>* [[P:%.*]], align 2
1108
+ ; CHECK-NEXT: [[R:%.*]] = and <2 x i8> [[A]], <i8 undef, i8 32>
1109
+ ; CHECK-NEXT: ret <2 x i8> [[R]]
1110
+ ;
1111
+ %a = add <2 x i8 > %x , <i8 -64 , i8 undef > ; 0xc0
1112
+ store <2 x i8 > %a , <2 x i8 >* %p
1113
+ %r = and <2 x i8 > %a , <i8 undef , i8 32 > ; 0x20
1114
+ ret <2 x i8 > %r
1115
+ }
1116
+
1117
+ define <2 x i8 > @lowmask_add_vec (<2 x i8 > %x , <2 x i8 >* %p ) {
1118
+ ; CHECK-LABEL: @lowmask_add_vec(
1119
+ ; CHECK-NEXT: [[A:%.*]] = add <2 x i8> [[X:%.*]], <i8 -96, i8 -64>
1120
+ ; CHECK-NEXT: store <2 x i8> [[A]], <2 x i8>* [[P:%.*]], align 2
1121
+ ; CHECK-NEXT: [[R:%.*]] = and <2 x i8> [[A]], <i8 16, i8 32>
1122
+ ; CHECK-NEXT: ret <2 x i8> [[R]]
1123
+ ;
1124
+ %a = add <2 x i8 > %x , <i8 -96 , i8 -64 > ; 0xe0, 0xc0
1125
+ store <2 x i8 > %a , <2 x i8 >* %p
1126
+ %r = and <2 x i8 > %a , <i8 16 , i8 32 > ; 0x10, 0x20
1127
+ ret <2 x i8 > %r
1128
+ }
0 commit comments