This is an archive of the discontinued LLVM Phabricator instance.

[x86] improve awkward 'icmp eq i1' codegen
AbandonedPublic

Authored by spatel on Apr 29 2020, 6:20 AM.

Details

Summary

xor (xor i1 X, Y), 1 --> x86setcc (cmp eq X, Y)

As noted in PR45703:
https://bugs.llvm.org/show_bug.cgi?id=45703

I doubt this could ever be a visible x86 perf problem, but our current canonical form in both IR and SDAG is annoyingly not what most would expect as the normal form.

Diff Detail

Event Timeline

spatel created this revision.Apr 29 2020, 6:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2020, 6:20 AM
spatel abandoned this revision.Apr 30 2020, 6:49 AM

Abandoning - as discussed in PR45703, this could be a regression on some uarch, so there's no real incentive to add code for it.