This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Fold G_SELECT cc, %t, (G_ADD %x, 1) -> CSINC %t, %x, cc
ClosedPublic

Authored by paquette on Dec 8 2020, 10:26 AM.

Details

Summary

This implements

G_SELECT cc, %true, (G_ADD %x, 1) -> CSINC %true, %x, cc
G_SELECT cc, (G_ADD %x, 1), %false -> CSINC %x, %false, inv_cc

Godbolt example: https://godbolt.org/z/eoPqKq

Diff Detail