Page MenuHomePhabricator

[InstCombine] Don't transform code if DoTransform is false

Authored by Carrot on Jun 18 2021, 12:53 PM.



In patch, it doesn't check DoTransform before transforming the code, and generates wrong result for the attached test case.

Diff Detail

Event Timeline

Carrot created this revision.Jun 18 2021, 12:53 PM
Carrot requested review of this revision.Jun 18 2021, 12:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2021, 12:53 PM
lebedev.ri accepted this revision.Jun 18 2021, 1:04 PM

I think that function is misdesigned, but i can't suggest an easy good alternative.


Please add a comment to the function explaining this weird DoTransform behaviour.

This revision is now accepted and ready to land.Jun 18 2021, 1:04 PM
Carrot updated this revision to Diff 353092.Jun 18 2021, 1:56 PM
Carrot marked an inline comment as done.

Thanks for the quick review!
Will commit this version.

This revision was landed with ongoing or failed builds.Jun 18 2021, 6:03 PM
This revision was automatically updated to reflect the committed changes.