Lines Matching refs:Assume
44 bool hasMatchesExactlyAttributes(IntrinsicInst *Assume, Value *WasOn, in hasMatchesExactlyAttributes() argument
54 if (ShouldHaveAttr != hasAttributeInAssume(*Assume, WasOn, Attr)) in hasMatchesExactlyAttributes()
60 bool hasTheRightValue(IntrinsicInst *Assume, Value *WasOn, in hasTheRightValue() argument
63 if (!hasAttributeInAssume(*Assume, WasOn, Kind, &ArgVal)) in hasTheRightValue()
87 IntrinsicInst *Assume = buildAssumeFromInst(I); in TEST() local
88 Assume->insertBefore(I); in TEST()
89 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, I->getOperand(0), in TEST()
91 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, I->getOperand(1), in TEST()
93 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(0), in TEST()
95 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(0), in TEST()
97 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(0), in TEST()
107 IntrinsicInst *Assume = buildAssumeFromInst(I); in TEST() local
108 Assume->insertBefore(I); in TEST()
109 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, I->getOperand(0), in TEST()
111 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, I->getOperand(1), in TEST()
113 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, I->getOperand(2), in TEST()
115 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, I->getOperand(3), in TEST()
117 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(0), in TEST()
119 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(0), in TEST()
121 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(1), in TEST()
127 IntrinsicInst *Assume = buildAssumeFromInst(I); in TEST() local
128 Assume->insertBefore(I); in TEST()
130 Assume, nullptr, "(align|nounwind|norecurse|willreturn|cold)")); in TEST()
135 IntrinsicInst *Assume = cast<IntrinsicInst>(I); in TEST() local
136 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, nullptr, "")); in TEST()
145 IntrinsicInst *Assume = buildAssumeFromInst(I); in TEST() local
146 Assume->insertBefore(I); in TEST()
148 Assume, I->getOperand(0), in TEST()
150 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, I->getOperand(1), in TEST()
152 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, I->getOperand(2), in TEST()
154 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, I->getOperand(3), in TEST()
156 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(0), in TEST()
158 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(0), in TEST()
160 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(1), in TEST()
162 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(1), in TEST()
164 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(2), in TEST()
166 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(2), in TEST()
168 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(3), in TEST()
170 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(3), in TEST()
181 IntrinsicInst *Assume = buildAssumeFromInst(I); in TEST() local
182 Assume->insertBefore(I); in TEST()
187 Assume, I->getOperand(0), in TEST()
189 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, I->getOperand(1), in TEST()
191 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, I->getOperand(2), in TEST()
193 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, I->getOperand(3), in TEST()
195 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(0), in TEST()
197 ASSERT_TRUE(hasTheRightValue(Assume, I->getOperand(0), in TEST()
204 IntrinsicInst *Assume = buildAssumeFromInst(I); in TEST() local
205 Assume->insertBefore(I); in TEST()
208 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, New, "")); in TEST()
209 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, Old, in TEST()
212 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, New, in TEST()
214 ASSERT_TRUE(hasMatchesExactlyAttributes(Assume, Old, "")); in TEST()
260 IntrinsicInst *Assume = buildAssumeFromInst(I); in TEST() local
261 Assume->insertBefore(I); in TEST()
264 fillMapFromAssume(*Assume, Map); in TEST()
270 Map, Assume, {I->getOperand(0), Attribute::Dereferenceable}, {16, 16})); in TEST()
271 ASSERT_TRUE(MapHasRightValue(Map, Assume, {I->getOperand(0), Attribute::Alignment}, in TEST()
273 ASSERT_TRUE(MapHasRightValue(Map, Assume, {I->getOperand(0), Attribute::Alignment}, in TEST()
283 IntrinsicInst *Assume = buildAssumeFromInst(I); in TEST() local
284 Assume->insertBefore(I); in TEST()
287 fillMapFromAssume(*Assume, Map); in TEST()
298 Map, Assume, {I->getOperand(0), Attribute::Dereferenceable}, in TEST()
301 Map, Assume, {I->getOperand(0), Attribute::Alignment}, {64, 64})); in TEST()
306 IntrinsicInst *Assume = buildAssumeFromInst(I); in TEST() local
307 Assume->insertBefore(I); in TEST()
310 fillMapFromAssume(*Assume, Map); in TEST()
331 IntrinsicInst *Assume = buildAssumeFromInst(I); in TEST() local
332 Assume->insertBefore(I); in TEST()
335 fillMapFromAssume(*Assume, Map); in TEST()
345 ASSERT_TRUE(MapHasRightValue(Map, Assume, {I->getOperand(0), Attribute::Alignment}, in TEST()
348 Map, Assume, {I->getOperand(0), Attribute::Dereferenceable}, {48, 48})); in TEST()
350 Map, Assume, {I->getOperand(1), Attribute::Dereferenceable}, {28, 28})); in TEST()
351 ASSERT_TRUE(MapHasRightValue(Map, Assume, {I->getOperand(1), Attribute::Alignment}, in TEST()
353 ASSERT_TRUE(MapHasRightValue(Map, Assume, {I->getOperand(2), Attribute::Alignment}, in TEST()
356 Map, Assume, {I->getOperand(2), Attribute::Dereferenceable}, {4, 4})); in TEST()
357 ASSERT_TRUE(MapHasRightValue(Map, Assume, {I->getOperand(3), Attribute::Alignment}, in TEST()
360 Map, Assume, {I->getOperand(3), Attribute::Dereferenceable}, {12, 12})); in TEST()
368 IntrinsicInst *Assume = buildAssumeFromInst(I); in TEST() local
369 Assume->insertBefore(I); in TEST()
372 fillMapFromAssume(*Assume, Map); in TEST()
381 fillMapFromAssume(*Assume, Map); in TEST()
452 auto *Assume = cast<IntrinsicInst>(IntrinsicInst::Create( in RunRandTest() local
454 Assume->insertBefore(&F->begin()->front()); in RunRandTest()
456 fillMapFromAssume(*Assume, Map); in RunRandTest()
464 MinMax MM = LookupIt->second[Assume]; in RunRandTest()
512 ASSERT_EQ(AR[0].Assume, &*Second); in TEST()
516 ASSERT_EQ(AR[0].Assume, &*First); in TEST()
521 ASSERT_EQ(AR[0].Assume, &*First); in TEST()
523 ASSERT_EQ(AR[1].Assume, &*Second); in TEST()
525 ASSERT_EQ(AR[2].Assume, &*First); in TEST()
529 ASSERT_EQ(AR[0].Assume, &*Second); in TEST()
538 ASSERT_EQ(AR[0].Assume, &*First); in TEST()
540 ASSERT_EQ(AR[1].Assume, nullptr); in TEST()
542 ASSERT_EQ(AR[2].Assume, &*First); in TEST()
547 ASSERT_EQ(AR[0].Assume, &*First); in TEST()