This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Add one use restriction for the pattern (and (add x, c1), (lshr y, c2))
AbandonedPublic

Authored by wwei on Aug 15 2021, 11:56 PM.

Details

Summary

If the output of (add x, c1) happens to be the input(that is, y) of (lshr y, c2), the fold for (and (add x, c1), (lshr y, c2)) may get a wrong result.

Diff Detail

Unit TestsFailed

Event Timeline

wwei created this revision.Aug 15 2021, 11:56 PM
wwei requested review of this revision.Aug 15 2021, 11:56 PM

There was some other patch for this, but i can't find it now.
There was more disscussion there.

wwei added a comment.Aug 16 2021, 12:43 AM

Thanks for pointing out the duplicate fix, I will close this patch

wwei abandoned this revision.Aug 16 2021, 12:47 AM