Page MenuHomePhabricator

[Constant] Add containsPoisonElement
ClosedPublic

Authored by aqjune on Mon, Jan 4, 5:18 PM.

Details

Summary

This patch

  • Adds containsPoisonElement that checks existence of poison in constant vector elements,
  • Renames containsUndefElement to containsUndefOrPoisonElement to clarify its behavior & updates its uses properly

With this patch, isGuaranteedNotToBeUndefOrPoison's tests w.r.t constant vectors are added because its analysis is improved.

Thanks!

Diff Detail

Event Timeline

aqjune created this revision.Mon, Jan 4, 5:18 PM
aqjune requested review of this revision.Mon, Jan 4, 5:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptMon, Jan 4, 5:18 PM
nikic accepted this revision.Tue, Jan 5, 11:25 AM

LGTM with a nit.

llvm/lib/IR/Constants.cpp
309

Prefer function_ref<> over std::function.

This revision is now accepted and ready to land.Tue, Jan 5, 11:25 AM
aqjune updated this revision to Diff 314773.Tue, Jan 5, 7:11 PM

Use function_ref

aqjune marked an inline comment as done.Tue, Jan 5, 7:11 PM
This revision was landed with ongoing or failed builds.Tue, Jan 5, 7:12 PM
This revision was automatically updated to reflect the committed changes.