Lines Matching refs:IRB

38   IRBuilder<true, NoFolder> IRB;  member
45 BB(BasicBlock::Create(Ctx, "entry", F)), IRB(BB) {} in PatternMatchTest()
54 Value *One = IRB.CreateAdd(IRB.CreateAdd(IRB.getInt32(1), IRB.getInt32(2)), in TEST_F()
55 IRB.getInt32(42)); in TEST_F()
56 Value *Two = IRB.CreateAdd(One, IRB.getInt32(42)); in TEST_F()
57 Value *Leaf = IRB.CreateAdd(IRB.CreateAdd(Two, IRB.getInt32(8)), in TEST_F()
58 IRB.CreateAdd(Two, IRB.getInt32(13))); in TEST_F()
69 Type *FltTy = IRB.getFloatTy(); in TEST_F()
76 .match(IRB.CreateSelect(IRB.CreateFCmpOLT(L, R), L, R))); in TEST_F()
82 .match(IRB.CreateSelect(IRB.CreateFCmpOLE(L, R), L, R))); in TEST_F()
88 .match(IRB.CreateSelect(IRB.CreateFCmpOGE(L, R), L, R))); in TEST_F()
92 .match(IRB.CreateSelect(IRB.CreateFCmpOGT(L, R), L, R))); in TEST_F()
96 .match(IRB.CreateSelect(IRB.CreateFCmpOGE(L, R), R, L))); in TEST_F()
102 .match(IRB.CreateSelect(IRB.CreateFCmpOGT(L, R), R, L))); in TEST_F()
108 Type *FltTy = IRB.getFloatTy(); in TEST_F()
115 .match(IRB.CreateSelect(IRB.CreateFCmpOGT(L, R), L, R))); in TEST_F()
121 .match(IRB.CreateSelect(IRB.CreateFCmpOGE(L, R), L, R))); in TEST_F()
127 .match(IRB.CreateSelect(IRB.CreateFCmpOLE(L, R), L, R))); in TEST_F()
131 .match(IRB.CreateSelect(IRB.CreateFCmpOLT(L, R), L, R))); in TEST_F()
135 .match(IRB.CreateSelect(IRB.CreateFCmpOLE(L, R), R, L))); in TEST_F()
141 .match(IRB.CreateSelect(IRB.CreateFCmpOLT(L, R), R, L))); in TEST_F()
147 Type *FltTy = IRB.getFloatTy(); in TEST_F()
154 .match(IRB.CreateSelect(IRB.CreateFCmpULT(L, R), L, R))); in TEST_F()
160 .match(IRB.CreateSelect(IRB.CreateFCmpULE(L, R), L, R))); in TEST_F()
166 .match(IRB.CreateSelect(IRB.CreateFCmpUGE(L, R), L, R))); in TEST_F()
170 .match(IRB.CreateSelect(IRB.CreateFCmpUGT(L, R), L, R))); in TEST_F()
174 .match(IRB.CreateSelect(IRB.CreateFCmpUGE(L, R), R, L))); in TEST_F()
180 .match(IRB.CreateSelect(IRB.CreateFCmpUGT(L, R), R, L))); in TEST_F()
186 Type *FltTy = IRB.getFloatTy(); in TEST_F()
193 .match(IRB.CreateSelect(IRB.CreateFCmpUGT(L, R), L, R))); in TEST_F()
199 .match(IRB.CreateSelect(IRB.CreateFCmpUGE(L, R), L, R))); in TEST_F()
205 .match(IRB.CreateSelect(IRB.CreateFCmpULE(L, R), L, R))); in TEST_F()
209 .match(IRB.CreateSelect(IRB.CreateFCmpULT(L, R), L, R))); in TEST_F()
213 .match(IRB.CreateSelect(IRB.CreateFCmpULE(L, R), R, L))); in TEST_F()
219 .match(IRB.CreateSelect(IRB.CreateFCmpULT(L, R), R, L))); in TEST_F()
225 Value *L = IRB.getInt32(1); in TEST_F()
226 Value *R = IRB.getInt32(2); in TEST_F()
230 m_NSWAdd(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNSWAdd(L, R))); in TEST_F()
235 m_NSWSub(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNSWSub(L, R))); in TEST_F()
240 m_NSWMul(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNSWMul(L, R))); in TEST_F()
245 IRB.CreateShl(L, R, "", /* NUW */ false, /* NSW */ true))); in TEST_F()
250 m_NUWAdd(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNUWAdd(L, R))); in TEST_F()
255 m_NUWSub(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNUWSub(L, R))); in TEST_F()
260 m_NUWMul(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNUWMul(L, R))); in TEST_F()
265 IRB.CreateShl(L, R, "", /* NUW */ true, /* NSW */ false))); in TEST_F()
269 EXPECT_FALSE(m_NSWAdd(m_Value(), m_Value()).match(IRB.CreateAdd(L, R))); in TEST_F()
270 EXPECT_FALSE(m_NSWAdd(m_Value(), m_Value()).match(IRB.CreateNUWAdd(L, R))); in TEST_F()
271 EXPECT_FALSE(m_NSWAdd(m_Value(), m_Value()).match(IRB.CreateNSWSub(L, R))); in TEST_F()
272 EXPECT_FALSE(m_NSWSub(m_Value(), m_Value()).match(IRB.CreateSub(L, R))); in TEST_F()
273 EXPECT_FALSE(m_NSWSub(m_Value(), m_Value()).match(IRB.CreateNUWSub(L, R))); in TEST_F()
274 EXPECT_FALSE(m_NSWSub(m_Value(), m_Value()).match(IRB.CreateNSWAdd(L, R))); in TEST_F()
275 EXPECT_FALSE(m_NSWMul(m_Value(), m_Value()).match(IRB.CreateMul(L, R))); in TEST_F()
276 EXPECT_FALSE(m_NSWMul(m_Value(), m_Value()).match(IRB.CreateNUWMul(L, R))); in TEST_F()
277 EXPECT_FALSE(m_NSWMul(m_Value(), m_Value()).match(IRB.CreateNSWAdd(L, R))); in TEST_F()
278 EXPECT_FALSE(m_NSWShl(m_Value(), m_Value()).match(IRB.CreateShl(L, R))); in TEST_F()
280 IRB.CreateShl(L, R, "", /* NUW */ true, /* NSW */ false))); in TEST_F()
281 EXPECT_FALSE(m_NSWShl(m_Value(), m_Value()).match(IRB.CreateNSWAdd(L, R))); in TEST_F()
283 EXPECT_FALSE(m_NUWAdd(m_Value(), m_Value()).match(IRB.CreateAdd(L, R))); in TEST_F()
284 EXPECT_FALSE(m_NUWAdd(m_Value(), m_Value()).match(IRB.CreateNSWAdd(L, R))); in TEST_F()
285 EXPECT_FALSE(m_NUWAdd(m_Value(), m_Value()).match(IRB.CreateNUWSub(L, R))); in TEST_F()
286 EXPECT_FALSE(m_NUWSub(m_Value(), m_Value()).match(IRB.CreateSub(L, R))); in TEST_F()
287 EXPECT_FALSE(m_NUWSub(m_Value(), m_Value()).match(IRB.CreateNSWSub(L, R))); in TEST_F()
288 EXPECT_FALSE(m_NUWSub(m_Value(), m_Value()).match(IRB.CreateNUWAdd(L, R))); in TEST_F()
289 EXPECT_FALSE(m_NUWMul(m_Value(), m_Value()).match(IRB.CreateMul(L, R))); in TEST_F()
290 EXPECT_FALSE(m_NUWMul(m_Value(), m_Value()).match(IRB.CreateNSWMul(L, R))); in TEST_F()
291 EXPECT_FALSE(m_NUWMul(m_Value(), m_Value()).match(IRB.CreateNUWAdd(L, R))); in TEST_F()
292 EXPECT_FALSE(m_NUWShl(m_Value(), m_Value()).match(IRB.CreateShl(L, R))); in TEST_F()
294 IRB.CreateShl(L, R, "", /* NUW */ false, /* NSW */ true))); in TEST_F()
295 EXPECT_FALSE(m_NUWShl(m_Value(), m_Value()).match(IRB.CreateNUWAdd(L, R))); in TEST_F()