This is an archive of the discontinued LLVM Phabricator instance.

[ValueTracking] Search dominate condition to check if a value is pow2 or not
AbandonedPublic

Authored by bcl5980 on Feb 5 2023, 8:22 PM.

Diff Detail

Event Timeline

bcl5980 created this revision.Feb 5 2023, 8:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2023, 8:22 PM
bcl5980 requested review of this revision.Feb 5 2023, 8:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2023, 8:22 PM
StephenFan added inline comments.Feb 8 2023, 6:25 AM
llvm/lib/Analysis/ValueTracking.cpp
2274

It seems it is no test coveraged here.

bcl5980 added inline comments.Feb 8 2023, 6:27 PM
llvm/lib/Analysis/ValueTracking.cpp
2274

I think @known_power_of_two_urem_dominate_y_and_yminus1_eq_0 already covered it.

StephenFan added inline comments.Feb 8 2023, 7:47 PM
llvm/lib/Analysis/ValueTracking.cpp
2274

Oh, It was covered. But only when OrZero is false, if it would be better to also cover the case that OrZero is true.

bcl5980 updated this revision to Diff 496020.Feb 8 2023, 9:21 PM

add negative test for OrZero is false.

bcl5980 abandoned this revision.Mar 14 2023, 10:47 PM