This is an archive of the discontinued LLVM Phabricator instance.

[X86] Simplify X86ISD::ADD/SUB if we don't use the result flag
ClosedPublic

Authored by RKSimon on Jan 25 2019, 5:20 AM.

Details

Summary

Simplify to the generic ISD::ADD/SUB if we don't make use of the result flag.

This mainly helps with ADDCARRY/SUBBORROW intrinsics which get expanded to X86ISD::ADD/SUB but could be simplified further.

Noticed in some of the test cases in PR31754

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Jan 25 2019, 5:20 AM
spatel accepted this revision.Jan 25 2019, 6:45 AM

LGTM

lib/Target/X86/X86ISelLowering.cpp
40451 ↗(On Diff #183524)

Assert that the incoming opcode is X86ISD::ADD or X86ISD::SUB?

This revision is now accepted and ready to land.Jan 25 2019, 6:45 AM
This revision was automatically updated to reflect the committed changes.