@@ -823,8 +823,8 @@ define i1 @mul_nuw_urem_cmp_constant1(i8 %x) {
823
823
824
824
; Invert predicate and check vector type.
825
825
826
- define <2 x i1 > @mul_nuw_urem_cmp_constant2 (<2 x i8 > %x ) {
827
- ; CHECK-LABEL: @mul_nuw_urem_cmp_constant2 (
826
+ define <2 x i1 > @mul_nuw_urem_cmp_constant_vec_splat (<2 x i8 > %x ) {
827
+ ; CHECK-LABEL: @mul_nuw_urem_cmp_constant_vec_splat (
828
828
; CHECK-NEXT: [[M:%.*]] = mul nuw <2 x i8> [[X:%.*]], <i8 45, i8 45>
829
829
; CHECK-NEXT: [[R:%.*]] = icmp ne <2 x i8> [[M]], <i8 15, i8 15>
830
830
; CHECK-NEXT: ret <2 x i1> [[R]]
@@ -834,10 +834,32 @@ define <2 x i1> @mul_nuw_urem_cmp_constant2(<2 x i8> %x) {
834
834
ret <2 x i1 > %r
835
835
}
836
836
837
+ define <2 x i1 > @mul_nuw_urem_cmp_constant_vec_splat_undef1 (<2 x i8 > %x ) {
838
+ ; CHECK-LABEL: @mul_nuw_urem_cmp_constant_vec_splat_undef1(
839
+ ; CHECK-NEXT: [[M:%.*]] = mul nuw <2 x i8> [[X:%.*]], <i8 45, i8 45>
840
+ ; CHECK-NEXT: [[R:%.*]] = icmp ne <2 x i8> [[M]], <i8 15, i8 undef>
841
+ ; CHECK-NEXT: ret <2 x i1> [[R]]
842
+ ;
843
+ %m = mul nuw <2 x i8 > %x , <i8 45 , i8 45 >
844
+ %r = icmp ne <2 x i8 > %m , <i8 15 , i8 undef >
845
+ ret <2 x i1 > %r
846
+ }
847
+
848
+ define <2 x i1 > @mul_nuw_urem_cmp_constant_vec_splat_undef2 (<2 x i8 > %x ) {
849
+ ; CHECK-LABEL: @mul_nuw_urem_cmp_constant_vec_splat_undef2(
850
+ ; CHECK-NEXT: [[M:%.*]] = mul nuw <2 x i8> [[X:%.*]], <i8 undef, i8 45>
851
+ ; CHECK-NEXT: [[R:%.*]] = icmp ne <2 x i8> [[M]], <i8 15, i8 15>
852
+ ; CHECK-NEXT: ret <2 x i1> [[R]]
853
+ ;
854
+ %m = mul nuw <2 x i8 > %x , <i8 undef , i8 45 >
855
+ %r = icmp ne <2 x i8 > %m , <i8 15 , i8 15 >
856
+ ret <2 x i1 > %r
857
+ }
858
+
837
859
; Check "negative" numbers (constants should be analyzed as unsigned).
838
860
839
- define i1 @mul_nuw_smaller_cmp_constant_vec_splat (i8 %x ) {
840
- ; CHECK-LABEL: @mul_nuw_smaller_cmp_constant_vec_splat (
861
+ define i1 @mul_nuw_urem_cmp_constant2 (i8 %x ) {
862
+ ; CHECK-LABEL: @mul_nuw_urem_cmp_constant2 (
841
863
; CHECK-NEXT: [[M:%.*]] = mul nuw i8 [[X:%.*]], -42
842
864
; CHECK-NEXT: [[R:%.*]] = icmp eq i8 [[M]], -84
843
865
; CHECK-NEXT: ret i1 [[R]]
0 commit comments