This is an archive of the discontinued LLVM Phabricator instance.

[StructurizeCFG] Clean up some boolean not instructions
ClosedPublic

Authored by foad on Jan 31 2022, 9:01 AM.

Details

Summary

In some cases StructurizeCFG inserts i1 xor instructions to invert
predicates. Add a quick loop to clean these up afterwards if we can get
away with modifying an existing compare instruction instead.
(StructurizeCFG is generally run late in the pipeline so instcombine
does not clean them up for us.)

Diff Detail