This is an archive of the discontinued LLVM Phabricator instance.

[Local] invertCondition: try modifying an existing ICmpInst
ClosedPublic

Authored by foad on Jan 28 2022, 8:03 AM.

Details

Summary

This avoids various cases where StructurizeCFG would otherwise insert an
xor i1 instruction, and it since it generally runs late in the pipeline,
instcombine does not clean up the xor-of-cmp pattern.

Diff Detail

Event Timeline

foad created this revision.Jan 28 2022, 8:03 AM
foad requested review of this revision.Jan 28 2022, 8:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2022, 8:03 AM
arsenm accepted this revision.Jan 28 2022, 8:06 AM
This revision is now accepted and ready to land.Jan 28 2022, 8:06 AM
foad updated this revision to Diff 404051.Jan 28 2022, 9:18 AM

Update remaining AMDGPU tests by hand.

foad edited the summary of this revision. (Show Details)Jan 28 2022, 9:18 AM
This revision was landed with ongoing or failed builds.Jan 31 2022, 2:46 AM
This revision was automatically updated to reflect the committed changes.
foad added a comment.Jan 31 2022, 9:01 AM

foad added a reverting change:

D118623 is an attempt to implement this in StructurizeCFG instead.