This is an archive of the discontinued LLVM Phabricator instance.

[X86] Make the subus special case in LowerVSETCC self contained
ClosedPublic

Authored by craig.topper on Feb 20 2018, 2:24 PM.

Details

Summary

Previously this code overrode the flags and opcode used by the later code in LowerVSETCC. This makes the code difficult to read and follow.

This patch moves all the SUBUS code into its own function and makes it responsible for creating its own SDNodes on success.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Feb 20 2018, 2:24 PM
spatel accepted this revision.Feb 22 2018, 10:16 AM

LGTM. Thanks for the clean-up!

lib/Target/X86/X86ISelLowering.cpp
18136–18139 ↗(On Diff #135147)

No need to duplicate the function comment here. Also, if you use the doxygen special '///' on top of the function, then some IDEs show that comment as part of auto-completion options. It's nice when it works. :)

This revision is now accepted and ready to land.Feb 22 2018, 10:16 AM
This revision was automatically updated to reflect the committed changes.