This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Extend add x, (ext setcc) combine to sub
ClosedPublic

Authored by arsenm on Nov 12 2019, 2:29 AM.

Details

Reviewers
rampitec
Summary

This is the same as the add case, but inverts the operation type.

This avoids regressions in a future patch.

Diff Detail

Event Timeline

arsenm created this revision.Nov 12 2019, 2:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 12 2019, 2:29 AM

AFAIR this was there with the first version of the combine, but then triggered bugs. Please run PSDB before going forward. It should work but exposed problems previously.

llvm/lib/Target/AMDGPU/SIISelLowering.cpp
9596

What's the point of this check? Performance or correctness? It needs a comment.

arsenm updated this revision to Diff 228874.Nov 12 2019, 5:20 AM

Add comments. This passed precheckin

This revision is now accepted and ready to land.Nov 12 2019, 9:18 AM