Lines Matching refs:match
61 EXPECT_TRUE(m_OneUse(m_Value(V)).match(One)); in TEST_F()
64 EXPECT_FALSE(m_OneUse(m_Value()).match(Two)); in TEST_F()
65 EXPECT_FALSE(m_OneUse(m_Value()).match(Leaf)); in TEST_F()
78 .match(Zero)); in TEST_F()
81 .match(One)); in TEST_F()
84 .match(NegOne)); in TEST_F()
88 .match(Zero)); in TEST_F()
91 .match(One)); in TEST_F()
94 .match(NegOne)); in TEST_F()
98 .match(Zero)); in TEST_F()
101 .match(One)); in TEST_F()
104 .match(NegOne)); in TEST_F()
117 .match(Zero)); in TEST_F()
120 .match(One)); in TEST_F()
123 .match(NegOne)); in TEST_F()
127 .match(Zero)); in TEST_F()
130 .match(One)); in TEST_F()
133 .match(NegOne)); in TEST_F()
137 .match(Zero)); in TEST_F()
140 .match(One)); in TEST_F()
143 .match(NegOne)); in TEST_F()
156 .match(Zero)); in TEST_F()
159 .match(One)); in TEST_F()
162 .match(NegOne)); in TEST_F()
166 .match(Zero)); in TEST_F()
169 .match(One)); in TEST_F()
172 .match(NegOne)); in TEST_F()
176 .match(Zero)); in TEST_F()
179 .match(One)); in TEST_F()
182 .match(NegOne)); in TEST_F()
192 EXPECT_TRUE(m_Negative().match(NegOne)); in TEST_F()
193 EXPECT_FALSE(m_NonNegative().match(NegOne)); in TEST_F()
194 EXPECT_FALSE(m_StrictlyPositive().match(NegOne)); in TEST_F()
195 EXPECT_TRUE(m_NonPositive().match(NegOne)); in TEST_F()
197 EXPECT_FALSE(m_Negative().match(Zero)); in TEST_F()
198 EXPECT_TRUE(m_NonNegative().match(Zero)); in TEST_F()
199 EXPECT_FALSE(m_StrictlyPositive().match(Zero)); in TEST_F()
200 EXPECT_TRUE(m_NonPositive().match(Zero)); in TEST_F()
202 EXPECT_FALSE(m_Negative().match(One)); in TEST_F()
203 EXPECT_TRUE(m_NonNegative().match(One)); in TEST_F()
204 EXPECT_TRUE(m_StrictlyPositive().match(One)); in TEST_F()
205 EXPECT_FALSE(m_NonPositive().match(One)); in TEST_F()
218 .match(Zero)); in TEST_F()
221 .match(One)); in TEST_F()
224 .match(NegOne)); in TEST_F()
228 .match(Zero)); in TEST_F()
231 .match(One)); in TEST_F()
234 .match(NegOne)); in TEST_F()
238 .match(Zero)); in TEST_F()
241 .match(One)); in TEST_F()
244 .match(NegOne)); in TEST_F()
257 .match(Zero)); in TEST_F()
260 .match(One)); in TEST_F()
263 .match(NegOne)); in TEST_F()
267 .match(Zero)); in TEST_F()
270 .match(One)); in TEST_F()
273 .match(NegOne)); in TEST_F()
277 .match(Zero)); in TEST_F()
280 .match(One)); in TEST_F()
283 .match(NegOne)); in TEST_F()
296 .match(Zero)); in TEST_F()
299 .match(One)); in TEST_F()
302 .match(NegOne)); in TEST_F()
306 .match(Zero)); in TEST_F()
309 .match(One)); in TEST_F()
312 .match(NegOne)); in TEST_F()
316 .match(Zero)); in TEST_F()
319 .match(One)); in TEST_F()
322 .match(NegOne)); in TEST_F()
335 .match(Zero)); in TEST_F()
338 .match(One)); in TEST_F()
341 .match(NegOne)); in TEST_F()
345 .match(Zero)); in TEST_F()
348 .match(One)); in TEST_F()
351 .match(NegOne)); in TEST_F()
355 .match(Zero)); in TEST_F()
358 .match(One)); in TEST_F()
361 .match(NegOne)); in TEST_F()
374 .match(Zero)); in TEST_F()
377 .match(One)); in TEST_F()
380 .match(NegOne)); in TEST_F()
384 .match(Zero)); in TEST_F()
387 .match(One)); in TEST_F()
390 .match(NegOne)); in TEST_F()
394 .match(Zero)); in TEST_F()
397 .match(One)); in TEST_F()
400 .match(NegOne)); in TEST_F()
413 .match(Zero)); in TEST_F()
416 .match(One)); in TEST_F()
419 .match(NegOne)); in TEST_F()
423 .match(Zero)); in TEST_F()
426 .match(One)); in TEST_F()
429 .match(NegOne)); in TEST_F()
433 .match(Zero)); in TEST_F()
436 .match(One)); in TEST_F()
439 .match(NegOne)); in TEST_F()
452 .match(Zero)); in TEST_F()
455 .match(One)); in TEST_F()
458 .match(NegOne)); in TEST_F()
462 .match(Zero)); in TEST_F()
465 .match(One)); in TEST_F()
468 .match(NegOne)); in TEST_F()
472 .match(Zero)); in TEST_F()
475 .match(One)); in TEST_F()
478 .match(NegOne)); in TEST_F()
484 EXPECT_TRUE(m_Add(m_One(), m_Zero()).match(X)); in TEST_F()
485 EXPECT_FALSE(m_Add(m_Zero(), m_One()).match(X)); in TEST_F()
487 EXPECT_FALSE(m_Unless(m_Add(m_One(), m_Zero())).match(X)); in TEST_F()
488 EXPECT_TRUE(m_Unless(m_Add(m_Zero(), m_One())).match(X)); in TEST_F()
490 EXPECT_TRUE(m_c_Add(m_One(), m_Zero()).match(X)); in TEST_F()
491 EXPECT_TRUE(m_c_Add(m_Zero(), m_One()).match(X)); in TEST_F()
493 EXPECT_FALSE(m_Unless(m_c_Add(m_One(), m_Zero())).match(X)); in TEST_F()
494 EXPECT_FALSE(m_Unless(m_c_Add(m_Zero(), m_One())).match(X)); in TEST_F()
504 EXPECT_TRUE(m_One().match(One32)); in TEST_F()
505 EXPECT_FALSE(m_One().match(One64Z)); in TEST_F()
506 EXPECT_FALSE(m_One().match(One64S)); in TEST_F()
508 EXPECT_FALSE(m_ZExt(m_One()).match(One32)); in TEST_F()
509 EXPECT_TRUE(m_ZExt(m_One()).match(One64Z)); in TEST_F()
510 EXPECT_FALSE(m_ZExt(m_One()).match(One64S)); in TEST_F()
512 EXPECT_FALSE(m_SExt(m_One()).match(One32)); in TEST_F()
513 EXPECT_FALSE(m_SExt(m_One()).match(One64Z)); in TEST_F()
514 EXPECT_TRUE(m_SExt(m_One()).match(One64S)); in TEST_F()
516 EXPECT_TRUE(m_ZExtOrSelf(m_One()).match(One32)); in TEST_F()
517 EXPECT_TRUE(m_ZExtOrSelf(m_One()).match(One64Z)); in TEST_F()
518 EXPECT_FALSE(m_ZExtOrSelf(m_One()).match(One64S)); in TEST_F()
520 EXPECT_TRUE(m_SExtOrSelf(m_One()).match(One32)); in TEST_F()
521 EXPECT_FALSE(m_SExtOrSelf(m_One()).match(One64Z)); in TEST_F()
522 EXPECT_TRUE(m_SExtOrSelf(m_One()).match(One64S)); in TEST_F()
524 EXPECT_FALSE(m_ZExtOrSExt(m_One()).match(One32)); in TEST_F()
525 EXPECT_TRUE(m_ZExtOrSExt(m_One()).match(One64Z)); in TEST_F()
526 EXPECT_TRUE(m_ZExtOrSExt(m_One()).match(One64S)); in TEST_F()
528 EXPECT_TRUE(m_ZExtOrSExtOrSelf(m_One()).match(One32)); in TEST_F()
529 EXPECT_TRUE(m_ZExtOrSExtOrSelf(m_One()).match(One64Z)); in TEST_F()
530 EXPECT_TRUE(m_ZExtOrSExtOrSelf(m_One()).match(One64S)); in TEST_F()
537 EXPECT_TRUE(m_Power2().match(C128)); in TEST_F()
538 EXPECT_FALSE(m_Power2().match(CNeg128)); in TEST_F()
540 EXPECT_FALSE(m_NegatedPower2().match(C128)); in TEST_F()
541 EXPECT_TRUE(m_NegatedPower2().match(CNeg128)); in TEST_F()
546 EXPECT_TRUE(m_Power2().match(CIntMin)); in TEST_F()
547 EXPECT_TRUE(m_Power2().match(CNegIntMin)); in TEST_F()
549 EXPECT_TRUE(m_NegatedPower2().match(CIntMin)); in TEST_F()
550 EXPECT_TRUE(m_NegatedPower2().match(CNegIntMin)); in TEST_F()
559 EXPECT_TRUE(match(X, m_Deferred(tX))); in TEST_F()
560 EXPECT_FALSE(match(Y, m_Deferred(tX))); in TEST_F()
564 EXPECT_TRUE(match(X, m_Deferred(tX))); in TEST_F()
565 EXPECT_FALSE(match(Y, m_Deferred(tX))); in TEST_F()
569 EXPECT_TRUE(match(X, m_Deferred(tX))); in TEST_F()
570 EXPECT_FALSE(match(Y, m_Deferred(tX))); in TEST_F()
574 EXPECT_TRUE(match(X, m_Deferred(tX))); in TEST_F()
575 EXPECT_FALSE(match(Y, m_Deferred(tX))); in TEST_F()
580 EXPECT_TRUE(match(IRB.CreateAnd(X, X), m_And(m_Value(tX), m_Deferred(tX)))); in TEST_F()
586 match(IRB.CreateAnd(X, Y), m_c_And(m_Value(tX), m_Deferred(tX)))); in TEST_F()
591 EXPECT_TRUE(match( in TEST_F()
611 .match(IRB.CreateSelect(IRB.CreateFCmpOLT(L, R), L, R))); in TEST_F()
617 .match(IRB.CreateSelect(IRB.CreateFCmpOLE(L, R), L, R))); in TEST_F()
623 .match(IRB.CreateSelect(IRB.CreateFCmpOGE(L, R), L, R))); in TEST_F()
627 .match(IRB.CreateSelect(IRB.CreateFCmpOGT(L, R), L, R))); in TEST_F()
638 .match(IRB.CreateSelect(IRB.CreateFCmpOGE(L, R), R, L))); in TEST_F()
640 .match(IRB.CreateSelect(IRB.CreateFCmpUGE(L, R), R, L))); in TEST_F()
646 .match(IRB.CreateSelect(IRB.CreateFCmpOGT(L, R), R, L))); in TEST_F()
648 .match(IRB.CreateSelect(IRB.CreateFCmpUGT(L, R), R, L))); in TEST_F()
661 .match(IRB.CreateSelect(IRB.CreateFCmpOGT(L, R), L, R))); in TEST_F()
667 .match(IRB.CreateSelect(IRB.CreateFCmpOGE(L, R), L, R))); in TEST_F()
673 .match(IRB.CreateSelect(IRB.CreateFCmpOLE(L, R), L, R))); in TEST_F()
677 .match(IRB.CreateSelect(IRB.CreateFCmpOLT(L, R), L, R))); in TEST_F()
689 .match(IRB.CreateSelect(IRB.CreateFCmpOLE(L, R), R, L))); in TEST_F()
691 .match(IRB.CreateSelect(IRB.CreateFCmpULE(L, R), R, L))); in TEST_F()
697 .match(IRB.CreateSelect(IRB.CreateFCmpOLT(L, R), R, L))); in TEST_F()
699 .match(IRB.CreateSelect(IRB.CreateFCmpULT(L, R), R, L))); in TEST_F()
712 .match(IRB.CreateSelect(IRB.CreateFCmpULT(L, R), L, R))); in TEST_F()
718 .match(IRB.CreateSelect(IRB.CreateFCmpULE(L, R), L, R))); in TEST_F()
724 .match(IRB.CreateSelect(IRB.CreateFCmpUGE(L, R), L, R))); in TEST_F()
728 .match(IRB.CreateSelect(IRB.CreateFCmpUGT(L, R), L, R))); in TEST_F()
739 .match(IRB.CreateSelect(IRB.CreateFCmpUGE(L, R), R, L))); in TEST_F()
741 .match(IRB.CreateSelect(IRB.CreateFCmpOGE(L, R), R, L))); in TEST_F()
747 .match(IRB.CreateSelect(IRB.CreateFCmpUGT(L, R), R, L))); in TEST_F()
749 .match(IRB.CreateSelect(IRB.CreateFCmpOGT(L, R), R, L))); in TEST_F()
762 .match(IRB.CreateSelect(IRB.CreateFCmpUGT(L, R), L, R))); in TEST_F()
768 .match(IRB.CreateSelect(IRB.CreateFCmpUGE(L, R), L, R))); in TEST_F()
774 .match(IRB.CreateSelect(IRB.CreateFCmpULE(L, R), L, R))); in TEST_F()
778 .match(IRB.CreateSelect(IRB.CreateFCmpULT(L, R), L, R))); in TEST_F()
789 .match(IRB.CreateSelect(IRB.CreateFCmpULE(L, R), R, L))); in TEST_F()
791 .match(IRB.CreateSelect(IRB.CreateFCmpOLE(L, R), R, L))); in TEST_F()
797 .match(IRB.CreateSelect(IRB.CreateFCmpULT(L, R), R, L))); in TEST_F()
799 .match(IRB.CreateSelect(IRB.CreateFCmpOLT(L, R), R, L))); in TEST_F()
810 m_NSWAdd(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNSWAdd(L, R))); in TEST_F()
815 m_NSWSub(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNSWSub(L, R))); in TEST_F()
820 m_NSWMul(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNSWMul(L, R))); in TEST_F()
824 EXPECT_TRUE(m_NSWShl(m_Value(MatchL), m_Value(MatchR)).match( in TEST_F()
830 m_NUWAdd(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNUWAdd(L, R))); in TEST_F()
835 m_NUWSub(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNUWSub(L, R))); in TEST_F()
840 m_NUWMul(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNUWMul(L, R))); in TEST_F()
844 EXPECT_TRUE(m_NUWShl(m_Value(MatchL), m_Value(MatchR)).match( in TEST_F()
849 EXPECT_FALSE(m_NSWAdd(m_Value(), m_Value()).match(IRB.CreateAdd(L, R))); in TEST_F()
850 EXPECT_FALSE(m_NSWAdd(m_Value(), m_Value()).match(IRB.CreateNUWAdd(L, R))); in TEST_F()
851 EXPECT_FALSE(m_NSWAdd(m_Value(), m_Value()).match(IRB.CreateNSWSub(L, R))); in TEST_F()
852 EXPECT_FALSE(m_NSWSub(m_Value(), m_Value()).match(IRB.CreateSub(L, R))); in TEST_F()
853 EXPECT_FALSE(m_NSWSub(m_Value(), m_Value()).match(IRB.CreateNUWSub(L, R))); in TEST_F()
854 EXPECT_FALSE(m_NSWSub(m_Value(), m_Value()).match(IRB.CreateNSWAdd(L, R))); in TEST_F()
855 EXPECT_FALSE(m_NSWMul(m_Value(), m_Value()).match(IRB.CreateMul(L, R))); in TEST_F()
856 EXPECT_FALSE(m_NSWMul(m_Value(), m_Value()).match(IRB.CreateNUWMul(L, R))); in TEST_F()
857 EXPECT_FALSE(m_NSWMul(m_Value(), m_Value()).match(IRB.CreateNSWAdd(L, R))); in TEST_F()
858 EXPECT_FALSE(m_NSWShl(m_Value(), m_Value()).match(IRB.CreateShl(L, R))); in TEST_F()
859 EXPECT_FALSE(m_NSWShl(m_Value(), m_Value()).match( in TEST_F()
861 EXPECT_FALSE(m_NSWShl(m_Value(), m_Value()).match(IRB.CreateNSWAdd(L, R))); in TEST_F()
863 EXPECT_FALSE(m_NUWAdd(m_Value(), m_Value()).match(IRB.CreateAdd(L, R))); in TEST_F()
864 EXPECT_FALSE(m_NUWAdd(m_Value(), m_Value()).match(IRB.CreateNSWAdd(L, R))); in TEST_F()
865 EXPECT_FALSE(m_NUWAdd(m_Value(), m_Value()).match(IRB.CreateNUWSub(L, R))); in TEST_F()
866 EXPECT_FALSE(m_NUWSub(m_Value(), m_Value()).match(IRB.CreateSub(L, R))); in TEST_F()
867 EXPECT_FALSE(m_NUWSub(m_Value(), m_Value()).match(IRB.CreateNSWSub(L, R))); in TEST_F()
868 EXPECT_FALSE(m_NUWSub(m_Value(), m_Value()).match(IRB.CreateNUWAdd(L, R))); in TEST_F()
869 EXPECT_FALSE(m_NUWMul(m_Value(), m_Value()).match(IRB.CreateMul(L, R))); in TEST_F()
870 EXPECT_FALSE(m_NUWMul(m_Value(), m_Value()).match(IRB.CreateNSWMul(L, R))); in TEST_F()
871 EXPECT_FALSE(m_NUWMul(m_Value(), m_Value()).match(IRB.CreateNUWAdd(L, R))); in TEST_F()
872 EXPECT_FALSE(m_NUWShl(m_Value(), m_Value()).match(IRB.CreateShl(L, R))); in TEST_F()
873 EXPECT_FALSE(m_NUWShl(m_Value(), m_Value()).match( in TEST_F()
875 EXPECT_FALSE(m_NUWShl(m_Value(), m_Value()).match(IRB.CreateNUWAdd(L, R))); in TEST_F()
891 EXPECT_TRUE(m_Load(m_Value(MatchLoad)).match(LoadInst)); in TEST_F()
894 EXPECT_TRUE(m_Load(m_Specific(Alloca)).match(LoadInst)); in TEST_F()
896 EXPECT_FALSE(m_Load(m_Value(MatchLoad)).match(Alloca)); in TEST_F()
899 .match(StoreInst)); in TEST_F()
904 .match(Alloca)); in TEST_F()
907 .match(StoreInst)); in TEST_F()
909 .match(StoreInst)); in TEST_F()
911 .match(StoreInst)); in TEST_F()
965 EXPECT_TRUE(match(VI1, m_InsertElt(m_Value(), m_Value(), m_Value()))); in TEST_F()
967 match(VI1, m_InsertElt(m_Undef(), m_ConstantInt(), m_ConstantInt()))); in TEST_F()
969 match(VI1, m_InsertElt(m_Undef(), m_ConstantInt(), m_Zero()))); in TEST_F()
971 match(VI1, m_InsertElt(m_Undef(), m_SpecificInt(1), m_Zero()))); in TEST_F()
972 EXPECT_TRUE(match(VI2, m_InsertElt(m_Value(), m_Value(), m_Value()))); in TEST_F()
974 match(VI2, m_InsertElt(m_Value(), m_Value(), m_ConstantInt()))); in TEST_F()
976 match(VI2, m_InsertElt(m_Value(), m_ConstantInt(), m_Value()))); in TEST_F()
977 EXPECT_FALSE(match(VI2, m_InsertElt(m_Constant(), m_Value(), m_Value()))); in TEST_F()
978 EXPECT_TRUE(match(VI3, m_InsertElt(m_Value(A), m_Value(B), m_Value(C)))); in TEST_F()
985 EXPECT_TRUE(match(EX1, m_ExtractElt(m_Value(A), m_Value(B)))); in TEST_F()
989 EXPECT_FALSE(match(EX1, m_ExtractElt(m_Value(), m_ConstantInt()))); in TEST_F()
990 EXPECT_TRUE(match(EX2, m_ExtractElt(m_Value(), m_ConstantInt()))); in TEST_F()
991 EXPECT_TRUE(match(EX3, m_ExtractElt(m_Constant(), m_ConstantInt()))); in TEST_F()
995 EXPECT_TRUE(match(SI1, m_Shuffle(m_Value(), m_Undef(), m_ZeroMask()))); in TEST_F()
996 EXPECT_TRUE(match(SI2, m_Shuffle(m_Value(A), m_Value(B), m_Mask(Mask)))); in TEST_F()
1002 EXPECT_TRUE(match( in TEST_F()
1006 EXPECT_FALSE(match( in TEST_F()
1009 EXPECT_FALSE(match( in TEST_F()
1012 EXPECT_TRUE(match( in TEST_F()
1016 EXPECT_TRUE(match( in TEST_F()
1037 EXPECT_TRUE(match(ScalarUndef, m_Undef())); in TEST_F()
1038 EXPECT_TRUE(match(VectorUndef, m_Undef())); in TEST_F()
1039 EXPECT_FALSE(match(ScalarZero, m_Undef())); in TEST_F()
1040 EXPECT_FALSE(match(VectorZero, m_Undef())); in TEST_F()
1041 EXPECT_FALSE(match(VectorZeroUndef, m_Undef())); in TEST_F()
1043 EXPECT_FALSE(match(ScalarUndef, m_Zero())); in TEST_F()
1044 EXPECT_FALSE(match(VectorUndef, m_Zero())); in TEST_F()
1045 EXPECT_TRUE(match(ScalarZero, m_Zero())); in TEST_F()
1046 EXPECT_TRUE(match(VectorZero, m_Zero())); in TEST_F()
1047 EXPECT_TRUE(match(VectorZeroUndef, m_Zero())); in TEST_F()
1052 EXPECT_FALSE(match(ScalarUndef, m_APInt(C))); in TEST_F()
1053 EXPECT_FALSE(match(ScalarUndef, m_APIntForbidUndef(C))); in TEST_F()
1054 EXPECT_FALSE(match(ScalarUndef, m_APIntAllowUndef(C))); in TEST_F()
1055 EXPECT_FALSE(match(VectorUndef, m_APInt(C))); in TEST_F()
1056 EXPECT_FALSE(match(VectorUndef, m_APIntForbidUndef(C))); in TEST_F()
1057 EXPECT_FALSE(match(VectorUndef, m_APIntAllowUndef(C))); in TEST_F()
1061 EXPECT_TRUE(match(ScalarZero, m_APInt(C))); in TEST_F()
1064 EXPECT_TRUE(match(ScalarZero, m_APIntForbidUndef(C))); in TEST_F()
1067 EXPECT_TRUE(match(ScalarZero, m_APIntAllowUndef(C))); in TEST_F()
1070 EXPECT_TRUE(match(VectorZero, m_APInt(C))); in TEST_F()
1073 EXPECT_TRUE(match(VectorZero, m_APIntForbidUndef(C))); in TEST_F()
1076 EXPECT_TRUE(match(VectorZero, m_APIntAllowUndef(C))); in TEST_F()
1080 EXPECT_FALSE(match(VectorZeroUndef, m_APInt(C))); in TEST_F()
1081 EXPECT_FALSE(match(VectorZeroUndef, m_APIntForbidUndef(C))); in TEST_F()
1083 EXPECT_TRUE(match(VectorZeroUndef, m_APIntAllowUndef(C))); in TEST_F()
1107 EXPECT_TRUE(match(ScalarUndef, m_Undef())); in TEST_F()
1108 EXPECT_TRUE(match(VectorUndef, m_Undef())); in TEST_F()
1109 EXPECT_FALSE(match(ScalarZero, m_Undef())); in TEST_F()
1110 EXPECT_FALSE(match(VectorZero, m_Undef())); in TEST_F()
1111 EXPECT_FALSE(match(VectorZeroUndef, m_Undef())); in TEST_F()
1112 EXPECT_FALSE(match(VectorInfUndef, m_Undef())); in TEST_F()
1113 EXPECT_FALSE(match(VectorNaNUndef, m_Undef())); in TEST_F()
1115 EXPECT_FALSE(match(ScalarUndef, m_AnyZeroFP())); in TEST_F()
1116 EXPECT_FALSE(match(VectorUndef, m_AnyZeroFP())); in TEST_F()
1117 EXPECT_TRUE(match(ScalarZero, m_AnyZeroFP())); in TEST_F()
1118 EXPECT_TRUE(match(VectorZero, m_AnyZeroFP())); in TEST_F()
1119 EXPECT_TRUE(match(VectorZeroUndef, m_AnyZeroFP())); in TEST_F()
1120 EXPECT_FALSE(match(VectorInfUndef, m_AnyZeroFP())); in TEST_F()
1121 EXPECT_FALSE(match(VectorNaNUndef, m_AnyZeroFP())); in TEST_F()
1123 EXPECT_FALSE(match(ScalarUndef, m_NaN())); in TEST_F()
1124 EXPECT_FALSE(match(VectorUndef, m_NaN())); in TEST_F()
1125 EXPECT_FALSE(match(VectorZeroUndef, m_NaN())); in TEST_F()
1126 EXPECT_FALSE(match(ScalarPosInf, m_NaN())); in TEST_F()
1127 EXPECT_FALSE(match(ScalarNegInf, m_NaN())); in TEST_F()
1128 EXPECT_TRUE(match(ScalarNaN, m_NaN())); in TEST_F()
1129 EXPECT_FALSE(match(VectorInfUndef, m_NaN())); in TEST_F()
1130 EXPECT_TRUE(match(VectorNaNUndef, m_NaN())); in TEST_F()
1132 EXPECT_FALSE(match(ScalarUndef, m_NonNaN())); in TEST_F()
1133 EXPECT_FALSE(match(VectorUndef, m_NonNaN())); in TEST_F()
1134 EXPECT_TRUE(match(VectorZeroUndef, m_NonNaN())); in TEST_F()
1135 EXPECT_TRUE(match(ScalarPosInf, m_NonNaN())); in TEST_F()
1136 EXPECT_TRUE(match(ScalarNegInf, m_NonNaN())); in TEST_F()
1137 EXPECT_FALSE(match(ScalarNaN, m_NonNaN())); in TEST_F()
1138 EXPECT_TRUE(match(VectorInfUndef, m_NonNaN())); in TEST_F()
1139 EXPECT_FALSE(match(VectorNaNUndef, m_NonNaN())); in TEST_F()
1141 EXPECT_FALSE(match(ScalarUndef, m_Inf())); in TEST_F()
1142 EXPECT_FALSE(match(VectorUndef, m_Inf())); in TEST_F()
1143 EXPECT_FALSE(match(VectorZeroUndef, m_Inf())); in TEST_F()
1144 EXPECT_TRUE(match(ScalarPosInf, m_Inf())); in TEST_F()
1145 EXPECT_TRUE(match(ScalarNegInf, m_Inf())); in TEST_F()
1146 EXPECT_FALSE(match(ScalarNaN, m_Inf())); in TEST_F()
1147 EXPECT_TRUE(match(VectorInfUndef, m_Inf())); in TEST_F()
1148 EXPECT_FALSE(match(VectorNaNUndef, m_Inf())); in TEST_F()
1150 EXPECT_FALSE(match(ScalarUndef, m_NonInf())); in TEST_F()
1151 EXPECT_FALSE(match(VectorUndef, m_NonInf())); in TEST_F()
1152 EXPECT_TRUE(match(VectorZeroUndef, m_NonInf())); in TEST_F()
1153 EXPECT_FALSE(match(ScalarPosInf, m_NonInf())); in TEST_F()
1154 EXPECT_FALSE(match(ScalarNegInf, m_NonInf())); in TEST_F()
1155 EXPECT_TRUE(match(ScalarNaN, m_NonInf())); in TEST_F()
1156 EXPECT_FALSE(match(VectorInfUndef, m_NonInf())); in TEST_F()
1157 EXPECT_TRUE(match(VectorNaNUndef, m_NonInf())); in TEST_F()
1159 EXPECT_FALSE(match(ScalarUndef, m_Finite())); in TEST_F()
1160 EXPECT_FALSE(match(VectorUndef, m_Finite())); in TEST_F()
1161 EXPECT_TRUE(match(VectorZeroUndef, m_Finite())); in TEST_F()
1162 EXPECT_FALSE(match(ScalarPosInf, m_Finite())); in TEST_F()
1163 EXPECT_FALSE(match(ScalarNegInf, m_Finite())); in TEST_F()
1164 EXPECT_FALSE(match(ScalarNaN, m_Finite())); in TEST_F()
1165 EXPECT_FALSE(match(VectorInfUndef, m_Finite())); in TEST_F()
1166 EXPECT_FALSE(match(VectorNaNUndef, m_Finite())); in TEST_F()
1171 EXPECT_FALSE(match(ScalarUndef, m_APFloat(C))); in TEST_F()
1172 EXPECT_FALSE(match(ScalarUndef, m_APFloatForbidUndef(C))); in TEST_F()
1173 EXPECT_FALSE(match(ScalarUndef, m_APFloatAllowUndef(C))); in TEST_F()
1174 EXPECT_FALSE(match(VectorUndef, m_APFloat(C))); in TEST_F()
1175 EXPECT_FALSE(match(VectorUndef, m_APFloatForbidUndef(C))); in TEST_F()
1176 EXPECT_FALSE(match(VectorUndef, m_APFloatAllowUndef(C))); in TEST_F()
1180 EXPECT_TRUE(match(ScalarZero, m_APFloat(C))); in TEST_F()
1183 EXPECT_TRUE(match(ScalarZero, m_APFloatForbidUndef(C))); in TEST_F()
1186 EXPECT_TRUE(match(ScalarZero, m_APFloatAllowUndef(C))); in TEST_F()
1189 EXPECT_TRUE(match(VectorZero, m_APFloat(C))); in TEST_F()
1192 EXPECT_TRUE(match(VectorZero, m_APFloatForbidUndef(C))); in TEST_F()
1195 EXPECT_TRUE(match(VectorZero, m_APFloatAllowUndef(C))); in TEST_F()
1199 EXPECT_FALSE(match(VectorZeroUndef, m_APFloat(C))); in TEST_F()
1200 EXPECT_FALSE(match(VectorZeroUndef, m_APFloatForbidUndef(C))); in TEST_F()
1202 EXPECT_TRUE(match(VectorZeroUndef, m_APFloatAllowUndef(C))); in TEST_F()
1205 EXPECT_TRUE(match(VectorZeroUndef, m_Finite(C))); in TEST_F()
1221 EXPECT_TRUE(match(V, m_FNeg(m_Value(Match)))); in TEST_F()
1225 EXPECT_TRUE(match(V1, m_FNeg(m_Value(Match)))); in TEST_F()
1229 EXPECT_FALSE(match(V2, m_FNeg(m_Value(Match)))); in TEST_F()
1231 EXPECT_TRUE(match(V2, m_FNeg(m_Value(Match)))); in TEST_F()
1235 EXPECT_FALSE(match(V3, m_FNeg(m_Value(Match)))); in TEST_F()
1243 EXPECT_TRUE(match(Br1, m_Br(m_Value(), m_BasicBlock(), m_BasicBlock()))); in TEST_F()
1246 EXPECT_TRUE(match(Br1, m_Br(m_Value(), m_BasicBlock(A), m_BasicBlock(B)))); in TEST_F()
1251 match(Br1, m_Br(m_Value(), m_SpecificBB(FalseBB), m_BasicBlock()))); in TEST_F()
1253 match(Br1, m_Br(m_Value(), m_BasicBlock(), m_SpecificBB(TrueBB)))); in TEST_F()
1255 match(Br1, m_Br(m_Value(), m_SpecificBB(FalseBB), m_BasicBlock(TrueBB)))); in TEST_F()
1257 match(Br1, m_Br(m_Value(), m_SpecificBB(TrueBB), m_BasicBlock(FalseBB)))); in TEST_F()
1260 EXPECT_FALSE(match(Br1, m_Br(m_Value(), m_BasicBlock(A), m_Deferred(A)))); in TEST_F()
1263 EXPECT_TRUE(match(Br2, m_Br(m_Value(), m_BasicBlock(A), m_Deferred(A)))); in TEST_F()
1272 EXPECT_TRUE(match(Add0, m_ExtractValue<0>(m_Value()))); in TEST_F()
1273 EXPECT_FALSE(match(Add0, m_ExtractValue<1>(m_Value()))); in TEST_F()
1274 EXPECT_FALSE(match(Add1, m_ExtractValue<0>(m_Value()))); in TEST_F()
1275 EXPECT_TRUE(match(Add1, m_ExtractValue<1>(m_Value()))); in TEST_F()
1276 EXPECT_FALSE(match(Add, m_ExtractValue<1>(m_Value()))); in TEST_F()
1277 EXPECT_FALSE(match(Add, m_ExtractValue<1>(m_Value()))); in TEST_F()
1280 EXPECT_FALSE(match(Add0, m_WithOverflowInst(WOI))); in TEST_F()
1281 EXPECT_FALSE(match(Add1, m_WithOverflowInst(WOI))); in TEST_F()
1282 EXPECT_TRUE(match(Add, m_WithOverflowInst(WOI))); in TEST_F()
1284 EXPECT_TRUE(match(Add0, m_ExtractValue<0>(m_WithOverflowInst(WOI)))); in TEST_F()
1286 EXPECT_TRUE(match(Add1, m_ExtractValue<1>(m_WithOverflowInst(WOI)))); in TEST_F()
1298 .match(IRB.CreateBinaryIntrinsic(Intrinsic::smax, L, R))); in TEST_F()
1303 .match(IRB.CreateBinaryIntrinsic(Intrinsic::smin, L, R))); in TEST_F()
1308 .match(IRB.CreateBinaryIntrinsic(Intrinsic::umax, L, R))); in TEST_F()
1313 .match(IRB.CreateBinaryIntrinsic(Intrinsic::umin, L, R))); in TEST_F()
1319 .match(IRB.CreateBinaryIntrinsic(Intrinsic::smin, L, R))); in TEST_F()
1321 .match(IRB.CreateBinaryIntrinsic(Intrinsic::umax, L, R))); in TEST_F()
1323 .match(IRB.CreateBinaryIntrinsic(Intrinsic::umin, L, R))); in TEST_F()
1325 .match(IRB.CreateBinaryIntrinsic(Intrinsic::smax, L, R))); in TEST_F()
1343 EXPECT_TRUE(match( in TEST_F()
1346 EXPECT_FALSE(match( in TEST_F()
1357 match(Intrinsic5, m_Intrinsic<Intrinsic::instrprof_increment_step>( in TEST_F()
1368 match(Intrinsic5, in TEST_F()
1372 match(Intrinsic5, m_Intrinsic<Intrinsic::instrprof_increment_step>( in TEST_F()
1378 match(Intrinsic5, in TEST_F()
1382 match(Intrinsic5, m_Intrinsic<Intrinsic::instrprof_increment_step>( in TEST_F()
1388 match(Intrinsic5, in TEST_F()
1392 match(Intrinsic5, m_Intrinsic<Intrinsic::instrprof_increment_step>( in TEST_F()
1398 match(Intrinsic5, in TEST_F()
1402 match(Intrinsic5, m_Intrinsic<Intrinsic::instrprof_increment_step>( in TEST_F()
1448 EXPECT_TRUE(match(CU32Max, cst_pred_ty<is_unsigned_max_pred>())); in TEST_F()
1449 EXPECT_FALSE(match(CU32Max, cst_pred_ty<is_unsigned_zero_pred>())); in TEST_F()
1450 EXPECT_TRUE(match(CU32Max, cst_pred_ty<always_true_pred<APInt>>())); in TEST_F()
1451 EXPECT_FALSE(match(CU32Max, cst_pred_ty<always_false_pred<APInt>>())); in TEST_F()
1453 EXPECT_FALSE(match(CU32Zero, cst_pred_ty<is_unsigned_max_pred>())); in TEST_F()
1454 EXPECT_TRUE(match(CU32Zero, cst_pred_ty<is_unsigned_zero_pred>())); in TEST_F()
1455 EXPECT_TRUE(match(CU32Zero, cst_pred_ty<always_true_pred<APInt>>())); in TEST_F()
1456 EXPECT_FALSE(match(CU32Zero, cst_pred_ty<always_false_pred<APInt>>())); in TEST_F()
1458 EXPECT_FALSE(match(CU32DeadBeef, cst_pred_ty<is_unsigned_max_pred>())); in TEST_F()
1459 EXPECT_FALSE(match(CU32DeadBeef, cst_pred_ty<is_unsigned_zero_pred>())); in TEST_F()
1460 EXPECT_TRUE(match(CU32DeadBeef, cst_pred_ty<always_true_pred<APInt>>())); in TEST_F()
1461 EXPECT_FALSE(match(CU32DeadBeef, cst_pred_ty<always_false_pred<APInt>>())); in TEST_F()
1474 EXPECT_TRUE(match(CF32NaN, cstfp_pred_ty<is_float_nan_pred>())); in TEST_F()
1475 EXPECT_FALSE(match(CF32NaN, cstfp_pred_ty<is_float_zero_pred>())); in TEST_F()
1476 EXPECT_TRUE(match(CF32NaN, cstfp_pred_ty<always_true_pred<APFloat>>())); in TEST_F()
1477 EXPECT_FALSE(match(CF32NaN, cstfp_pred_ty<always_false_pred<APFloat>>())); in TEST_F()
1479 EXPECT_FALSE(match(CF32Zero, cstfp_pred_ty<is_float_nan_pred>())); in TEST_F()
1480 EXPECT_TRUE(match(CF32Zero, cstfp_pred_ty<is_float_zero_pred>())); in TEST_F()
1481 EXPECT_TRUE(match(CF32Zero, cstfp_pred_ty<always_true_pred<APFloat>>())); in TEST_F()
1482 EXPECT_FALSE(match(CF32Zero, cstfp_pred_ty<always_false_pred<APFloat>>())); in TEST_F()
1484 EXPECT_FALSE(match(CF32Pi, cstfp_pred_ty<is_float_nan_pred>())); in TEST_F()
1485 EXPECT_FALSE(match(CF32Pi, cstfp_pred_ty<is_float_zero_pred>())); in TEST_F()
1486 EXPECT_TRUE(match(CF32Pi, cstfp_pred_ty<always_true_pred<APFloat>>())); in TEST_F()
1487 EXPECT_FALSE(match(CF32Pi, cstfp_pred_ty<always_false_pred<APFloat>>())); in TEST_F()
1501 EXPECT_TRUE(match(CSplatU32Max, cst_pred_ty<is_unsigned_max_pred>())); in TEST_F()
1502 EXPECT_FALSE(match(CSplatU32Max, cst_pred_ty<is_unsigned_zero_pred>())); in TEST_F()
1503 EXPECT_TRUE(match(CSplatU32Max, cst_pred_ty<always_true_pred<APInt>>())); in TEST_F()
1504 EXPECT_FALSE(match(CSplatU32Max, cst_pred_ty<always_false_pred<APInt>>())); in TEST_F()
1506 EXPECT_FALSE(match(CSplatU32Zero, cst_pred_ty<is_unsigned_max_pred>())); in TEST_F()
1507 EXPECT_TRUE(match(CSplatU32Zero, cst_pred_ty<is_unsigned_zero_pred>())); in TEST_F()
1508 EXPECT_TRUE(match(CSplatU32Zero, cst_pred_ty<always_true_pred<APInt>>())); in TEST_F()
1509 EXPECT_FALSE(match(CSplatU32Zero, cst_pred_ty<always_false_pred<APInt>>())); in TEST_F()
1511 EXPECT_FALSE(match(CSplatU32DeadBeef, cst_pred_ty<is_unsigned_max_pred>())); in TEST_F()
1513 match(CSplatU32DeadBeef, cst_pred_ty<is_unsigned_zero_pred>())); in TEST_F()
1515 match(CSplatU32DeadBeef, cst_pred_ty<always_true_pred<APInt>>())); in TEST_F()
1517 match(CSplatU32DeadBeef, cst_pred_ty<always_false_pred<APInt>>())); in TEST_F()
1525 EXPECT_TRUE(match(CSplatF32NaN, cstfp_pred_ty<is_float_nan_pred>())); in TEST_F()
1526 EXPECT_FALSE(match(CSplatF32NaN, cstfp_pred_ty<is_float_zero_pred>())); in TEST_F()
1528 match(CSplatF32NaN, cstfp_pred_ty<always_true_pred<APFloat>>())); in TEST_F()
1530 match(CSplatF32NaN, cstfp_pred_ty<always_false_pred<APFloat>>())); in TEST_F()
1532 EXPECT_FALSE(match(CSplatF32Zero, cstfp_pred_ty<is_float_nan_pred>())); in TEST_F()
1533 EXPECT_TRUE(match(CSplatF32Zero, cstfp_pred_ty<is_float_zero_pred>())); in TEST_F()
1535 match(CSplatF32Zero, cstfp_pred_ty<always_true_pred<APFloat>>())); in TEST_F()
1537 match(CSplatF32Zero, cstfp_pred_ty<always_false_pred<APFloat>>())); in TEST_F()
1539 EXPECT_FALSE(match(CSplatF32Pi, cstfp_pred_ty<is_float_nan_pred>())); in TEST_F()
1540 EXPECT_FALSE(match(CSplatF32Pi, cstfp_pred_ty<is_float_zero_pred>())); in TEST_F()
1541 EXPECT_TRUE(match(CSplatF32Pi, cstfp_pred_ty<always_true_pred<APFloat>>())); in TEST_F()
1543 match(CSplatF32Pi, cstfp_pred_ty<always_false_pred<APFloat>>())); in TEST_F()
1553 EXPECT_FALSE(match(CMixedU32, cst_pred_ty<is_unsigned_max_pred>())); in TEST_F()
1554 EXPECT_FALSE(match(CMixedU32, cst_pred_ty<is_unsigned_zero_pred>())); in TEST_F()
1555 EXPECT_TRUE(match(CMixedU32, cst_pred_ty<always_true_pred<APInt>>())); in TEST_F()
1556 EXPECT_FALSE(match(CMixedU32, cst_pred_ty<always_false_pred<APInt>>())); in TEST_F()
1558 EXPECT_TRUE(match(CU32MaxWithUndef, cst_pred_ty<is_unsigned_max_pred>())); in TEST_F()
1559 EXPECT_FALSE(match(CU32MaxWithUndef, cst_pred_ty<is_unsigned_zero_pred>())); in TEST_F()
1560 EXPECT_TRUE(match(CU32MaxWithUndef, cst_pred_ty<always_true_pred<APInt>>())); in TEST_F()
1562 match(CU32MaxWithUndef, cst_pred_ty<always_false_pred<APInt>>())); in TEST_F()
1571 EXPECT_FALSE(match(CMixedF32, cstfp_pred_ty<is_float_nan_pred>())); in TEST_F()
1572 EXPECT_FALSE(match(CMixedF32, cstfp_pred_ty<is_float_zero_pred>())); in TEST_F()
1573 EXPECT_TRUE(match(CMixedF32, cstfp_pred_ty<always_true_pred<APFloat>>())); in TEST_F()
1574 EXPECT_FALSE(match(CMixedF32, cstfp_pred_ty<always_false_pred<APFloat>>())); in TEST_F()
1576 EXPECT_TRUE(match(CF32NaNWithUndef, cstfp_pred_ty<is_float_nan_pred>())); in TEST_F()
1577 EXPECT_FALSE(match(CF32NaNWithUndef, cstfp_pred_ty<is_float_zero_pred>())); in TEST_F()
1579 match(CF32NaNWithUndef, cstfp_pred_ty<always_true_pred<APFloat>>())); in TEST_F()
1581 match(CF32NaNWithUndef, cstfp_pred_ty<always_false_pred<APFloat>>())); in TEST_F()
1591 EXPECT_TRUE(match(Ins0, m_InsertValue<0>(m_Value(), m_Value()))); in TEST_F()
1592 EXPECT_FALSE(match(Ins0, m_InsertValue<1>(m_Value(), m_Value()))); in TEST_F()
1593 EXPECT_FALSE(match(Ins1, m_InsertValue<0>(m_Value(), m_Value()))); in TEST_F()
1594 EXPECT_TRUE(match(Ins1, m_InsertValue<1>(m_Value(), m_Value()))); in TEST_F()
1596 EXPECT_TRUE(match(Ins0, m_InsertValue<0>(m_Undef(), m_SpecificInt(20)))); in TEST_F()
1597 EXPECT_FALSE(match(Ins0, m_InsertValue<0>(m_Undef(), m_SpecificInt(0)))); in TEST_F()
1600 match(Ins1, m_InsertValue<1>(m_InsertValue<0>(m_Value(), m_Value()), in TEST_F()
1602 EXPECT_FALSE(match(IRB.getInt64(99), m_InsertValue<0>(m_Value(), m_Value()))); in TEST_F()
1627 .match((InstructionType)IRB.CreateICmp(Pred, L, R))); in TYPED_TEST()